home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / QuickTime / QuickTime 3 Interfaces & Libs / QTDevMac / AIncludes / Sound.a < prev   
Encoding:
Text File  |  1998-08-21  |  75.8 KB  |  2,281 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Sound.a
  3. ;
  4. ;    Contains:    Sound Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    Sound Manager 3.3
  7. ;                Release:    QuickTime 3.0
  8. ;
  9. ;    Copyright:    © 1986-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__SOUND__') = 'UNDEFINED' THEN
  19. __SOUND__ SET 1
  20.  
  21.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  22.     include 'MacTypes.a'
  23.     ENDIF
  24.     IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
  25.     include 'Dialogs.a'
  26.     ENDIF
  27.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  28.     include 'Components.a'
  29.     ENDIF
  30.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  31.     include 'MixedMode.a'
  32.     ENDIF
  33.     IF &TYPE('__MOVIES__') = 'UNDEFINED' THEN
  34.     include 'Movies.a'
  35.     ENDIF
  36.  
  37. ;                        * * *  N O T E  * * *
  38. ;
  39. ;    This file has been updated to include Sound Manager 3.3 interfaces.
  40. ;
  41. ;    Some of the Sound Manager 3.0 interfaces were not put into the InterfaceLib
  42. ;    that originally shipped with the PowerMacs. These missing functions and the
  43. ;    new 3.3 interfaces have been released in the SoundLib library for PowerPC
  44. ;    developers to link with. The runtime library for these functions are
  45. ;    installed by the Sound Manager. The following functions are found in SoundLib.
  46. ;
  47. ;        GetCompressionInfo(), GetSoundPreference(), SetSoundPreference(),
  48. ;        UnsignedFixedMulDiv(), SndGetInfo(), SndSetInfo(), GetSoundOutputInfo(),
  49. ;        SetSoundOutputInfo(), GetCompressionName(), SoundConverterOpen(),
  50. ;        SoundConverterClose(), SoundConverterGetBufferSizes(), SoundConverterBeginConversion(),
  51. ;        SoundConverterConvertBuffer(), SoundConverterEndConversion(),
  52. ;        AudioGetBass(), AudioGetInfo(), AudioGetMute(), AudioGetOutputDevice(),
  53. ;        AudioGetTreble(), AudioGetVolume(), AudioMuteOnEvent(), AudioSetBass(),
  54. ;        AudioSetMute(), AudioSetToDefaults(), AudioSetTreble(), AudioSetVolume(),
  55. ;        OpenMixerSoundComponent(), CloseMixerSoundComponent(), SoundComponentAddSource(),
  56. ;        SoundComponentGetInfo(), SoundComponentGetSource(), SoundComponentGetSourceData(),
  57. ;        SoundComponentInitOutputDevice(), SoundComponentPauseSource(),
  58. ;        SoundComponentPlaySourceBuffer(), SoundComponentRemoveSource(),
  59. ;        SoundComponentSetInfo(), SoundComponentSetOutput(), SoundComponentSetSource(),
  60. ;        SoundComponentStartSource(), SoundComponentStopSource(),
  61. ;        ParseAIFFHeader(), ParseSndHeader(), SoundConverterGetInfo(), SoundConverterSetInfo()
  62. ;
  63.  
  64. ;    Interfaces for Sound Driver, !!! OBSOLETE and NOT SUPPORTED !!!
  65. ;
  66. ;    These items are no longer defined, but appear here so that someone
  67. ;    searching the interfaces might find them. If you are using one of these
  68. ;    items, you must change your code to support the Sound Manager.
  69. ;
  70. ;        swMode, ftMode, ffMode
  71. ;        FreeWave, FFSynthRec, Tone, SWSynthRec, Wave, FTSoundRec
  72. ;        SndCompletionProcPtr
  73. ;        StartSound, StopSound, SoundDone
  74. ;
  75.  
  76.  
  77. ;  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  78. ;   constants
  79. ;  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  80.  
  81.  
  82.  
  83. soundListRsrc                    EQU        'snd '                ;Resource type used by Sound Manager
  84.  
  85. kSimpleBeepID                    EQU        1                    ;reserved resource ID for Simple Beep
  86.  
  87. rate48khz                        EQU        $BB800000            ;48000.00000 in fixed-point
  88. rate44khz                        EQU        $AC440000            ;44100.00000 in fixed-point
  89. rate22050hz                        EQU        $56220000            ;22050.00000 in fixed-point
  90. rate22khz                        EQU        $56EE8BA3            ;22254.54545 in fixed-point
  91. rate11khz                        EQU        $2B7745D1            ;11127.27273 in fixed-point
  92. rate11025hz                        EQU        $2B110000            ;11025.00000 in fixed-point
  93.  
  94.                                                             ;synthesizer numbers for SndNewChannel
  95. squareWaveSynth                    EQU        1                    ;square wave synthesizer
  96. waveTableSynth                    EQU        3                    ;wave table synthesizer
  97. sampledSynth                    EQU        5                    ;sampled sound synthesizer
  98.                                                             ;old Sound Manager MACE synthesizer numbers
  99. MACE3snthID                        EQU        11
  100. MACE6snthID                        EQU        13
  101.  
  102. kMiddleC                        EQU        60                    ;MIDI note value for middle C
  103.  
  104. kNoVolume                        EQU        0                    ;setting for no sound volume
  105. kFullVolume                        EQU        $0100                ;1.0, setting for full hardware output volume
  106.  
  107. stdQLength                        EQU        128
  108.  
  109. dataOffsetFlag                    EQU        $8000
  110.  
  111. kUseOptionalOutputDevice        EQU        -1                    ;only for Sound Manager 3.0 or later
  112.  
  113. notCompressed                    EQU        0                    ;compression ID's
  114. fixedCompression                EQU        -1                    ;compression ID for fixed-sized compression
  115. variableCompression                EQU        -2                    ;compression ID for variable-sized compression
  116.  
  117. twoToOne                        EQU        1
  118. eightToThree                    EQU        2
  119. threeToOne                        EQU        3
  120. sixToOne                        EQU        4
  121. sixToOnePacketSize                EQU        8
  122. threeToOnePacketSize            EQU        16
  123.  
  124. stateBlockSize                    EQU        64
  125. leftOverBlockSize                EQU        32
  126.  
  127. firstSoundFormat                EQU        $0001                ;general sound format
  128. secondSoundFormat                EQU        $0002                ;special sampled sound format (HyperCard)
  129.  
  130. dbBufferReady                    EQU        $00000001            ;double buffer is filled
  131. dbLastBuffer                    EQU        $00000004            ;last double buffer to play
  132.  
  133. sysBeepDisable                    EQU        $0000                ;SysBeep() enable flags
  134. sysBeepEnable                    EQU        $01
  135. sysBeepSynchronous                EQU        $02                    ;if bit set, make alert sounds synchronous
  136.  
  137. unitTypeNoSelection                EQU        $FFFF                ;unitTypes for AudioSelection.unitType
  138. unitTypeSeconds                    EQU        $0000
  139. ; PPCAsm thinks “extSH” is a directive and therefore can't be a constant (?)
  140. ; But the 68k Asm needs to have these constants, so wrap them inside TARGET_CPU_68K
  141.     IF TARGET_CPU_68K THEN
  142.  
  143. stdSH                            EQU        $00                    ;Standard sound header encode value
  144. extSH                            EQU        $FF                    ;Extended sound header encode value
  145. cmpSH                            EQU        $FE                    ;Compressed sound header encode value
  146.     ENDIF    ; TARGET_CPU_68K
  147. ; command numbers for SndDoCommand and SndDoImmediate
  148.  
  149. nullCmd                            EQU        0
  150. initCmd                            EQU        1
  151. freeCmd                            EQU        2
  152. quietCmd                        EQU        3
  153. flushCmd                        EQU        4
  154. reInitCmd                        EQU        5
  155. waitCmd                            EQU        10
  156. pauseCmd                        EQU        11
  157. resumeCmd                        EQU        12
  158. callBackCmd                        EQU        13
  159. syncCmd                            EQU        14
  160. availableCmd                    EQU        24
  161. versionCmd                        EQU        25
  162. totalLoadCmd                    EQU        26
  163. loadCmd                            EQU        27
  164. freqDurationCmd                    EQU        40
  165. restCmd                            EQU        41
  166. freqCmd                            EQU        42
  167. ampCmd                            EQU        43
  168. timbreCmd                        EQU        44
  169. getAmpCmd                        EQU        45
  170. volumeCmd                        EQU        46                    ;sound manager 3.0 or later only
  171. getVolumeCmd                    EQU        47                    ;sound manager 3.0 or later only
  172. clockComponentCmd                EQU        50                    ;sound manager 3.2.1 or later only
  173. getClockComponentCmd            EQU        51                    ;sound manager 3.2.1 or later only
  174. scheduledSoundCmd                EQU        52                    ;sound manager 3.3 or later only
  175. linkSoundComponentsCmd            EQU        53                    ;sound manager 3.3 or later only
  176. waveTableCmd                    EQU        60
  177. phaseCmd                        EQU        61
  178. soundCmd                        EQU        80
  179. bufferCmd                        EQU        81
  180. rateCmd                            EQU        82
  181. continueCmd                        EQU        83
  182. doubleBufferCmd                    EQU        84
  183. getRateCmd                        EQU        85
  184. rateMultiplierCmd                EQU        86
  185. getRateMultiplierCmd            EQU        87
  186. sizeCmd                            EQU        90                    ;obsolete command
  187. convertCmd                        EQU        91                    ;obsolete MACE command
  188.     IF OLDROUTINENAMES THEN
  189. ; channel initialization parameters
  190.  
  191. waveInitChannelMask                EQU        $07
  192. waveInitChannel0                EQU        $04                    ;wave table only, Sound Manager 2.0 and earlier
  193. waveInitChannel1                EQU        $05                    ;wave table only, Sound Manager 2.0 and earlier
  194. waveInitChannel2                EQU        $06                    ;wave table only, Sound Manager 2.0 and earlier
  195. waveInitChannel3                EQU        $07                    ;wave table only, Sound Manager 2.0 and earlier
  196. initChan0                        EQU        $04                    ;obsolete spelling
  197. initChan1                        EQU        $05                    ;obsolete spelling
  198. initChan2                        EQU        $06                    ;obsolete spelling
  199. initChan3                        EQU        $07                    ;obsolete spelling
  200.  
  201. outsideCmpSH                    EQU        0                    ;obsolete MACE constant
  202. insideCmpSH                        EQU        1                    ;obsolete MACE constant
  203. aceSuccess                        EQU        0                    ;obsolete MACE constant
  204. aceMemFull                        EQU        1                    ;obsolete MACE constant
  205. aceNilBlock                        EQU        2                    ;obsolete MACE constant
  206. aceBadComp                        EQU        3                    ;obsolete MACE constant
  207. aceBadEncode                    EQU        4                    ;obsolete MACE constant
  208. aceBadDest                        EQU        5                    ;obsolete MACE constant
  209. aceBadCmd                        EQU        6                    ;obsolete MACE constant
  210.     ENDIF    ; OLDROUTINENAMES
  211.  
  212. initChanLeft                    EQU        $0002                ;left stereo channel
  213. initChanRight                    EQU        $0003                ;right stereo channel
  214. initNoInterp                    EQU        $0004                ;no linear interpolation
  215. initNoDrop                        EQU        $0008                ;no drop-sample conversion
  216. initMono                        EQU        $0080                ;monophonic channel
  217. initStereo                        EQU        $00C0                ;stereo channel
  218. initMACE3                        EQU        $0300                ;MACE 3:1
  219. initMACE6                        EQU        $0400                ;MACE 6:1
  220. initPanMask                        EQU        $0003                ;mask for right/left pan values
  221. initSRateMask                    EQU        $0030                ;mask for sample rate values
  222. initStereoMask                    EQU        $00C0                ;mask for mono/stereo values
  223. initCompMask                    EQU        $FF00                ;mask for compression IDs
  224. ; Get&Set Sound Information Selectors
  225.  
  226. siActiveChannels                EQU        'chac'                ;active channels
  227. siActiveLevels                    EQU        'lmac'                ;active meter levels
  228. siAGCOnOff                        EQU        'agc '                ;automatic gain control state
  229. siAsync                            EQU        'asyn'                ;asynchronous capability
  230. siAVDisplayBehavior                EQU        'avdb'
  231. siChannelAvailable                EQU        'chav'                ;number of channels available
  232. siCompressionAvailable            EQU        'cmav'                ;compression types available
  233. siCompressionChannels            EQU        'cpct'                ;compressor's number of channels
  234. siCompressionFactor                EQU        'cmfa'                ;current compression factor
  235. siCompressionHeader                EQU        'cmhd'                ;return compression header
  236. siCompressionNames                EQU        'cnam'                ;compression type names available
  237. siCompressionParams                EQU        'evaw'                ;compression parameters
  238. siCompressionSampleRate            EQU        'cprt'                ;compressor's sample rate
  239. siCompressionType                EQU        'comp'                ;current compression type
  240. siContinuous                    EQU        'cont'                ;continous recording
  241. siDecompressionParams            EQU        'wave'                ;decompression parameters
  242. siDeviceBufferInfo                EQU        'dbin'                ;size of interrupt buffer
  243. siDeviceConnected                EQU        'dcon'                ;input device connection status
  244. siDeviceIcon                    EQU        'icon'                ;input device icon
  245. siDeviceName                    EQU        'name'                ;input device name
  246. siHardwareBalance                EQU        'hbal'
  247. siHardwareBalanceSteps            EQU        'hbls'
  248. siHardwareBass                    EQU        'hbas'
  249. siHardwareBassSteps                EQU        'hbst'
  250. siHardwareBusy                    EQU        'hwbs'                ;sound hardware is in use
  251. siHardwareFormat                EQU        'hwfm'                ;get hardware format
  252. siHardwareMute                    EQU        'hmut'                ;mute state of all hardware
  253. siHardwareTreble                EQU        'htrb'
  254. siHardwareTrebleSteps            EQU        'hwts'
  255. siHardwareVolume                EQU        'hvol'                ;volume level of all hardware
  256. siHardwareVolumeSteps            EQU        'hstp'                ;number of volume steps for hardware
  257. siHeadphoneMute                    EQU        'pmut'                ;mute state of headphones
  258. siHeadphoneVolume                EQU        'pvol'                ;volume level of headphones
  259. siHeadphoneVolumeSteps            EQU        'hdst'                ;number of volume steps for headphones
  260. siInputAvailable                EQU        'inav'                ;input sources available
  261. siInputGain                        EQU        'gain'                ;input gain
  262. siInputSource                    EQU        'sour'                ;input source selector
  263. siInputSourceNames                EQU        'snam'                ;input source names
  264. siLevelMeterOnOff                EQU        'lmet'                ;level meter state
  265. siModemGain                        EQU        'mgai'                ;modem input gain
  266. siMonitorAvailable                EQU        'mnav'
  267. siMonitorSource                    EQU        'mons'
  268. siNumberChannels                EQU        'chan'                ;current number of channels
  269. siOptionsDialog                    EQU        'optd'                ;display options dialog
  270. siOSTypeInputSource                EQU        'inpt'                ;input source by OSType
  271. siOSTypeInputAvailable            EQU        'inav'                ;list of available input source OSTypes
  272. siPlayThruOnOff                    EQU        'plth'                ;playthrough state
  273. siPostMixerSoundComponent        EQU        'psmx'                ;install post-mixer effect
  274. siPreMixerSoundComponent        EQU        'prmx'                ;install pre-mixer effect
  275. siQuality                        EQU        'qual'                ;quality setting
  276. siRateMultiplier                EQU        'rmul'                ;throttle rate setting
  277. siRecordingQuality                EQU        'qual'                ;recording quality
  278. siSampleRate                    EQU        'srat'                ;current sample rate
  279. siSampleRateAvailable            EQU        'srav'                ;sample rates available
  280. siSampleSize                    EQU        'ssiz'                ;current sample size
  281. siSampleSizeAvailable            EQU        'ssav'                ;sample sizes available
  282. siSetupCDAudio                    EQU        'sucd'                ;setup sound hardware for CD audio
  283. siSetupModemAudio                EQU        'sumd'                ;setup sound hardware for modem audio
  284. siSlopeAndIntercept                EQU        'flap'                ;floating point variables for conversion
  285. siSoundClock                    EQU        'sclk'
  286. siUseThisSoundClock                EQU        'sclc'                ;sdev uses this to tell the mixer to use his sound clock
  287. siSpeakerMute                    EQU        'smut'                ;mute state of all built-in speaker
  288. siSpeakerVolume                    EQU        'svol'                ;volume level of built-in speaker
  289. siSSpCPULoadLimit                EQU        '3dll'
  290. siSSpLocalization                EQU        '3dif'
  291. siSSpSpeakerSetup                EQU        '3dst'
  292. siStereoInputGain                EQU        'sgai'                ;stereo input gain
  293. siSubwooferMute                    EQU        'bmut'                ;mute state of sub-woofer
  294. siTwosComplementOnOff            EQU        'twos'                ;two's complement state
  295. siVolume                        EQU        'volu'                ;volume level of source
  296. siVoxRecordInfo                    EQU        'voxr'                ;VOX record parameters
  297. siVoxStopInfo                    EQU        'voxs'                ;VOX stop parameters
  298. siWideStereo                    EQU        'wide'                ;wide stereo setting
  299.  
  300. siCloseDriver                    EQU        'clos'                ;reserved for internal use only
  301. siInitializeDriver                EQU        'init'                ;reserved for internal use only
  302. siPauseRecording                EQU        'paus'                ;reserved for internal use only
  303. siUserInterruptProc                EQU        'user'                ;reserved for internal use only
  304. ;  input source Types
  305.  
  306. kInvalidSource                    EQU        $FFFFFFFF            ;this source may be returned from GetInfo if no other source is the monitored source
  307. kNoSource                        EQU        'none'                ;no source selection
  308. kCDSource                        EQU        'cd  '                ;internal CD player input
  309. kExtMicSource                    EQU        'emic'                ;external mic input
  310. kRCAInSource                    EQU        'irca'                ;RCA jack input
  311. kTVFMTunerSource                EQU        'tvfm'
  312. kDAVInSource                    EQU        'idav'                ;DAV analog input
  313. kIntMicSource                    EQU        'imic'                ;internal mic input
  314. kMediaBaySource                    EQU        'mbay'                ;media bay input
  315. kModemSource                    EQU        'modm'                ;modem input (internal modem on desktops, PCI input on PowerBooks)
  316. kPCCardSource                    EQU        'pcm '                ;PC Card pwm input
  317. kZoomVideoSource                EQU        'zvpc'                ;zoom video input
  318. kDVDSource                        EQU        'dvda'                ;DVD audio input
  319. ; Sound Component Types and Subtypes
  320.  
  321. kNoSoundComponentType            EQU        '****'
  322. kSoundComponentType                EQU        'sift'                ;component type
  323. kSoundComponentPPCType            EQU        'nift'                ;component type for PowerPC code
  324. kRate8SubType                    EQU        'ratb'                ;8-bit rate converter
  325. kRate16SubType                    EQU        'ratw'                ;16-bit rate converter
  326. kConverterSubType                EQU        'conv'                ;sample format converter
  327. kSndSourceSubType                EQU        'sour'                ;generic source component
  328. kMixerType                        EQU        'mixr'
  329. kMixer8SubType                    EQU        'mixb'                ;8-bit mixer
  330. kMixer16SubType                    EQU        'mixw'                ;16-bit mixer
  331. kSoundInputDeviceType            EQU        'sinp'                ;sound input component
  332. kWaveInSubType                    EQU        'wavi'                ;Windows Wave
  333. kSoundOutputDeviceType            EQU        'sdev'                ;sound output component
  334. kClassicSubType                    EQU        'clas'                ;classic hardware, i.e. Mac Plus
  335. kASCSubType                        EQU        'asc '                ;Apple Sound Chip device
  336. kDSPSubType                        EQU        'dsp '                ;DSP device
  337. kAwacsSubType                    EQU        'awac'                ;Another of Will's Audio Chips device
  338. kGCAwacsSubType                    EQU        'awgc'                ;Awacs audio with Grand Central DMA
  339. kSingerSubType                    EQU        'sing'                ;Singer (via Whitney) based sound
  340. kSinger2SubType                    EQU        'sng2'                ;Singer 2 (via Whitney) for Acme
  341. kWhitSubType                    EQU        'whit'                ;Whit sound component for PrimeTime 3
  342. kSoundBlasterSubType            EQU        'sbls'                ;Sound Blaster for CHRP
  343. kWaveOutSubType                    EQU        'wavo'                ;Windows Wave
  344. kDirectSoundSubType                EQU        'dsnd'                ;Direct Sound
  345. kUNIXsdevSubType                EQU        'un1x'                ;UNIX base sdev
  346. kSoundCompressor                EQU        'scom'
  347. kSoundDecompressor                EQU        'sdec'
  348. kAudioComponentType                EQU        'adio'                ;Audio components and sub-types
  349. kAwacsPhoneSubType                EQU        'hphn'
  350. kAudioVisionSpeakerSubType        EQU        'telc'
  351. kAudioVisionHeadphoneSubType    EQU        'telh'
  352. kPhilipsFaderSubType            EQU        'tvav'
  353. kSGSToneSubType                    EQU        'sgs0'
  354. kSoundEffectsType                EQU        'snfx'                ;sound effects type
  355. kSSpLocalizationSubType            EQU        'snd3'
  356. kSoundPortHandlerType            EQU        'soph'                ;sound output port handler component
  357. kAwacsGCSubType                    EQU        'awgc'                ;awacs GC port handler
  358. kSoundOutPortType                EQU        'sopt'                ;sound output port component
  359. kIntSpkrSubType                    EQU        'ispk'                ;internal speaker
  360. kHeadphonesSubType                EQU        'hdpn'                ;headphones
  361. kExtSpkrSubType                    EQU        'espk'                ;external speaker
  362. kEffectSubType                    EQU        'efct'                ;effect (like SRS or some other DSP function)
  363. kSubwooferSubType                EQU        'subw'                ;subwoofer
  364. kSoundPowerType                    EQU        'spwr'                ;sound power component
  365. kPowerAwacsSubType                EQU        'awac'                ;awacs power
  366. kPowerScreamerSubType            EQU        'scrm'                ;screamer power
  367. ; Format Types
  368.  
  369. kSoundNotCompressed                EQU        'NONE'                ;sound is not compressed
  370. k8BitOffsetBinaryFormat            EQU        'raw '                ;8-bit offset binary
  371. k16BitBigEndianFormat            EQU        'twos'                ;16-bit big endian
  372. k16BitLittleEndianFormat        EQU        'sowt'                ;16-bit little endian
  373. kFloat32Format                    EQU        'fl32'                ;32-bit floating point
  374. kFloat64Format                    EQU        'fl64'                ;64-bit floating point
  375. k24BitFormat                    EQU        'in24'                ;24-bit integer
  376. k32BitFormat                    EQU        'in32'                ;32-bit integer
  377. kMACE3Compression                EQU        'MAC3'                ;MACE 3:1
  378. kMACE6Compression                EQU        'MAC6'                ;MACE 6:1
  379. kCDXA4Compression                EQU        'cdx4'                ;CD/XA 4:1
  380. kCDXA2Compression                EQU        'cdx2'                ;CD/XA 2:1
  381. kIMACompression                    EQU        'ima4'                ;IMA 4:1
  382. kULawCompression                EQU        'ulaw'                ;µLaw 2:1
  383. kALawCompression                EQU        'alaw'                ;aLaw 2:1
  384. kMicrosoftADPCMFormat            EQU        $6D730002            ;Microsoft ADPCM - ACM code 2
  385. kDVIIntelIMAFormat                EQU        $6D730011            ;DVI/Intel IMA ADPCM - ACM code 17
  386. kDVAudioFormat                    EQU        'dvca'                ;DV Audio
  387. kQDesignCompression                EQU        'QDMC'                ;QDesign music
  388. kQUALCOMMCompression            EQU        'Qclp'                ;QUALCOMM PureVoice
  389. kOffsetBinary                    EQU        'raw '                ;for compatibility
  390. kTwosComplement                    EQU        'twos'                ;for compatibility
  391. kLittleEndianFormat                EQU        'sowt'                ;for compatibility
  392.     IF TARGET_RT_LITTLE_ENDIAN THEN
  393.  
  394. k16BitNativeEndianFormat        EQU        'sowt'
  395. k16BitNonNativeEndianFormat        EQU        'twos'
  396.     ELSE
  397.  
  398. k16BitNativeEndianFormat        EQU        'twos'
  399. k16BitNonNativeEndianFormat        EQU        'sowt'
  400.     ENDIF    ; TARGET_RT_LITTLE_ENDIAN
  401. ; Features Flags
  402.  
  403. k8BitRawIn                        EQU        $01                    ;data description
  404. k8BitTwosIn                        EQU        $02
  405. k16BitIn                        EQU        $04
  406. kStereoIn                        EQU        $08
  407. k8BitRawOut                        EQU        $0100
  408. k8BitTwosOut                    EQU        $0200
  409. k16BitOut                        EQU        $0400
  410. kStereoOut                        EQU        $0800
  411. kReverse                        EQU        $00010000            ;  function description
  412. kRateConvert                    EQU        $00020000
  413. kCreateSoundSource                EQU        $00040000
  414. kHighQuality                    EQU        $00400000            ;  performance description
  415. kNonRealTime                    EQU        $00800000
  416. ; SoundComponentPlaySourceBuffer action flags
  417.  
  418. kSourcePaused                    EQU        $01
  419. kPassThrough                    EQU        $00010000
  420. kNoSoundComponentChain            EQU        $00020000
  421. ; SoundParamBlock flags, usefull for OpenMixerSoundComponent
  422.  
  423. kNoMixing                        EQU        $01                    ;don't mix source
  424. kNoSampleRateConversion            EQU        $02                    ;don't convert sample rate (i.e. 11 kHz -> 22 kHz)
  425. kNoSampleSizeConversion            EQU        $04                    ;don't convert sample size (i.e. 16 -> 8)
  426. kNoSampleFormatConversion        EQU        $08                    ;don't convert sample format (i.e. 'twos' -> 'raw ')
  427. kNoChannelConversion            EQU        $10                    ;don't convert stereo/mono
  428. kNoDecompression                EQU        $20                    ;don't decompress (i.e. 'MAC3' -> 'raw ')
  429. kNoVolumeConversion                EQU        $40                    ;don't apply volume
  430. kNoRealtimeProcessing            EQU        $80                    ;won't run at interrupt time
  431. kScheduledSource                EQU        $0100                ;source is scheduled
  432. ; SoundParamBlock quality settings
  433.  
  434. kBestQuality                    EQU        $01                    ;use interpolation in rate conversion
  435. ; useful bit masks
  436.  
  437. kInputMask                        EQU        $000000FF            ;masks off input bits
  438. kOutputMask                        EQU        $0000FF00            ;masks off output bits
  439. kOutputShift                    EQU        8                    ;amount output bits are shifted
  440. kActionMask                        EQU        $00FF0000            ;masks off action bits
  441. kSoundComponentBits                EQU        $00FFFFFF
  442. ; audio atom types
  443.  
  444. kAudioFormatAtomType            EQU        'frma'
  445. kAudioEndianAtomType            EQU        'enda'
  446. kAudioTerminatorAtomType        EQU        0
  447. ; siAVDisplayBehavior types
  448.  
  449. kAVDisplayHeadphoneRemove        EQU        0                    ; monitor does not have a headphone attached
  450. kAVDisplayHeadphoneInsert        EQU        1                    ; monitor has a headphone attached
  451. kAVDisplayPlainTalkRemove        EQU        2                    ; monitor either sending no input through CPU input port or unable to tell if input is coming in
  452. kAVDisplayPlainTalkInsert        EQU        3                    ; monitor sending PlainTalk level microphone source input through sound input port
  453. ; Audio Component constants
  454.  
  455.                                                             ;Values for whichChannel parameter
  456. audioAllChannels                EQU        0                    ;All channels (usually interpreted as both left and right)
  457. audioLeftChannel                EQU        1                    ;Left channel
  458. audioRightChannel                EQU        2                    ;Right channel
  459.                                                             ;Values for mute parameter
  460. audioUnmuted                    EQU        0                    ;Device is unmuted
  461. audioMuted                        EQU        1                    ;Device is muted
  462.                                                             ;Capabilities flags definitions
  463. audioDoesMono                    EQU        $00000001            ;Device supports mono output
  464. audioDoesStereo                    EQU        $00000002            ;Device supports stereo output
  465. audioDoesIndependentChannels    EQU        $00000004            ;Device supports independent software control of each channel
  466. ; Sound Input Qualities
  467.  
  468. siCDQuality                        EQU        'cd  '                ;44.1kHz, stereo, 16 bit
  469. siBestQuality                    EQU        'best'                ;22kHz, mono, 8 bit
  470. siBetterQuality                    EQU        'betr'                ;22kHz, mono, MACE 3:1
  471. siGoodQuality                    EQU        'good'                ;22kHz, mono, MACE 6:1
  472. siNoneQuality                    EQU        'none'                ;settings don't match any quality for a get call
  473.  
  474. siDeviceIsConnected                EQU        1                    ;input device is connected and ready for input
  475. siDeviceNotConnected            EQU        0                    ;input device is not connected
  476. siDontKnowIfConnected            EQU        -1                    ;can't tell if input device is connected
  477. siReadPermission                EQU        0                    ;permission passed to SPBOpenDevice
  478. siWritePermission                EQU        1                    ;permission passed to SPBOpenDevice
  479.  
  480. ;  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  481. ;   typedefs
  482. ;  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  483.  
  484.  
  485.  
  486. SndCommand                RECORD 0
  487. cmd                         ds.w    1                ; offset: $0 (0)
  488. param1                     ds.w    1                ; offset: $2 (2)
  489. param2                     ds.l    1                ; offset: $4 (4)
  490. sizeof                     EQU *                    ; size:   $8 (8)
  491.                         ENDR
  492.  
  493.  
  494. ; typedef SndChannel *                    SndChannelPtr
  495.  
  496. SndChannel                RECORD 0
  497. nextChan                 ds.l    1                ; offset: $0 (0)
  498. firstMod                 ds.l    1                ; offset: $4 (4)        ;  reserved for the Sound Manager 
  499. callBack                 ds.l    1                ; offset: $8 (8)
  500. userInfo                 ds.l    1                ; offset: $C (12)
  501. wait                     ds.l    1                ; offset: $10 (16)        ;  The following is for internal Sound Manager use only.
  502. cmdInProgress             ds        SndCommand        ; offset: $14 (20)
  503. flags                     ds.w    1                ; offset: $1C (28)
  504. qLength                     ds.w    1                ; offset: $1E (30)
  505. qHead                     ds.w    1                ; offset: $20 (32)
  506. qTail                     ds.w    1                ; offset: $22 (34)
  507. queue                     ds.b    128 * SndCommand.sizeof ; offset: $24 (36)
  508. sizeof                     EQU *                    ; size:   $424 (1060)
  509.                         ENDR
  510. ; MACE structures
  511. StateBlock                RECORD 0
  512. stateVar                 ds.w    64                ; offset: $0 (0)
  513. sizeof                     EQU *                    ; size:   $80 (128)
  514.                         ENDR
  515. ; typedef struct StateBlock *            StateBlockPtr
  516.  
  517. LeftOverBlock            RECORD 0
  518. count                     ds.l    1                ; offset: $0 (0)
  519. sampleArea                 ds.b    32                ; offset: $4 (4)
  520. sizeof                     EQU *                    ; size:   $24 (36)
  521.                         ENDR
  522. ; typedef struct LeftOverBlock *        LeftOverBlockPtr
  523.  
  524. ModRef                    RECORD 0
  525. modNumber                 ds.w    1                ; offset: $0 (0)
  526. modInit                     ds.l    1                ; offset: $2 (2)
  527. sizeof                     EQU *                    ; size:   $6 (6)
  528.                         ENDR
  529. SndListResource            RECORD 0
  530. format                     ds.w    1                ; offset: $0 (0)
  531. numModifiers             ds.w    1                ; offset: $2 (2)
  532. modifierPart             ds        ModRef            ; offset: $4 (4) <-- really an array of length one
  533. numCommands                 ds.w    1                ; offset: $A (10)
  534. commandPart                 ds        SndCommand        ; offset: $C (12) <-- really an array of length one
  535. dataPart                 ds.b    1                ; offset: $14 (20) <-- really an array of length one
  536.                          ORG 22
  537. sizeof                     EQU *                    ; size:   $16 (22)
  538.                         ENDR
  539. ; typedef struct SndListResource *        SndListPtr
  540.  
  541. ; typedef SndListPtr *                    SndListHandle
  542.  
  543. ; typedef SndListHandle                 SndListHndl
  544.  
  545. ; HyperCard sound resource format
  546. Snd2ListResource        RECORD 0
  547. format                     ds.w    1                ; offset: $0 (0)
  548. refCount                 ds.w    1                ; offset: $2 (2)
  549. numCommands                 ds.w    1                ; offset: $4 (4)
  550. commandPart                 ds        SndCommand        ; offset: $6 (6) <-- really an array of length one
  551. dataPart                 ds.b    1                ; offset: $E (14) <-- really an array of length one
  552.                          ORG 16
  553. sizeof                     EQU *                    ; size:   $10 (16)
  554.                         ENDR
  555. ; typedef struct Snd2ListResource *        Snd2ListPtr
  556.  
  557. ; typedef Snd2ListPtr *                    Snd2ListHandle
  558.  
  559. ; typedef Snd2ListHandle                 Snd2ListHndl
  560.  
  561. SoundHeader                RECORD 0
  562. samplePtr                 ds.l    1                ; offset: $0 (0)        ; if NIL then samples are in sampleArea
  563. length                     ds.l    1                ; offset: $4 (4)        ; length of sound in bytes
  564. sampleRate                 ds.l    1                ; offset: $8 (8)        ; sample rate for this sound
  565. loopStart                 ds.l    1                ; offset: $C (12)        ; start of looping portion
  566. loopEnd                     ds.l    1                ; offset: $10 (16)        ; end of looping portion
  567. encode                     ds.b    1                ; offset: $14 (20)        ; header encoding
  568. baseFrequency             ds.b    1                ; offset: $15 (21)        ; baseFrequency value
  569. sampleArea                 ds.b    1                ; offset: $16 (22) <-- really an array of length one ; space for when samples follow directly
  570.                          ORG 24
  571. sizeof                     EQU *                    ; size:   $18 (24)
  572.                         ENDR
  573. ; typedef struct SoundHeader *            SoundHeaderPtr
  574.  
  575. CmpSoundHeader            RECORD 0
  576. samplePtr                 ds.l    1                ; offset: $0 (0)        ; if nil then samples are in sample area
  577. numChannels                 ds.l    1                ; offset: $4 (4)        ; number of channels i.e. mono = 1
  578. sampleRate                 ds.l    1                ; offset: $8 (8)        ; sample rate in Apples Fixed point representation
  579. loopStart                 ds.l    1                ; offset: $C (12)        ; loopStart of sound before compression
  580. loopEnd                     ds.l    1                ; offset: $10 (16)        ; loopEnd of sound before compression
  581. encode                     ds.b    1                ; offset: $14 (20)        ; data structure used , stdSH, extSH, or cmpSH
  582. baseFrequency             ds.b    1                ; offset: $15 (21)        ; same meaning as regular SoundHeader
  583. numFrames                 ds.l    1                ; offset: $16 (22)        ; length in frames ( packetFrames or sampleFrames )
  584. AIFFSampleRate             ds        extended80        ; offset: $1A (26)        ; IEEE sample rate
  585. markerChunk                 ds.l    1                ; offset: $24 (36)        ; sync track
  586. format                     ds.l    1                ; offset: $28 (40)        ; data format type, was futureUse1
  587. futureUse2                 ds.l    1                ; offset: $2C (44)        ; reserved by Apple
  588. stateVars                 ds.l    1                ; offset: $30 (48)        ; pointer to State Block
  589. leftOverSamples             ds.l    1                ; offset: $34 (52)        ; used to save truncated samples between compression calls
  590. compressionID             ds.w    1                ; offset: $38 (56)        ; 0 means no compression, non zero means compressionID
  591. packetSize                 ds.w    1                ; offset: $3A (58)        ; number of bits in compressed sample packet
  592. snthID                     ds.w    1                ; offset: $3C (60)        ; resource ID of Sound Manager snth that contains NRT C/E
  593. sampleSize                 ds.w    1                ; offset: $3E (62)        ; number of bits in non-compressed sample
  594. sampleArea                 ds.b    1                ; offset: $40 (64) <-- really an array of length one ; space for when samples follow directly
  595.                          ORG 66
  596. sizeof                     EQU *                    ; size:   $42 (66)
  597.                         ENDR
  598. ; typedef struct CmpSoundHeader *        CmpSoundHeaderPtr
  599.  
  600. ExtSoundHeader            RECORD 0
  601. samplePtr                 ds.l    1                ; offset: $0 (0)        ; if nil then samples are in sample area
  602. numChannels                 ds.l    1                ; offset: $4 (4)        ; number of channels,  ie mono = 1
  603. sampleRate                 ds.l    1                ; offset: $8 (8)        ; sample rate in Apples Fixed point representation
  604. loopStart                 ds.l    1                ; offset: $C (12)        ; same meaning as regular SoundHeader
  605. loopEnd                     ds.l    1                ; offset: $10 (16)        ; same meaning as regular SoundHeader
  606. encode                     ds.b    1                ; offset: $14 (20)        ; data structure used , stdSH, extSH, or cmpSH
  607. baseFrequency             ds.b    1                ; offset: $15 (21)        ; same meaning as regular SoundHeader
  608. numFrames                 ds.l    1                ; offset: $16 (22)        ; length in total number of frames
  609. AIFFSampleRate             ds        extended80        ; offset: $1A (26)        ; IEEE sample rate
  610. markerChunk                 ds.l    1                ; offset: $24 (36)        ; sync track
  611. instrumentChunks         ds.l    1                ; offset: $28 (40)        ; AIFF instrument chunks
  612. AESRecording             ds.l    1                ; offset: $2C (44)
  613. sampleSize                 ds.w    1                ; offset: $30 (48)        ; number of bits in sample
  614. futureUse1                 ds.w    1                ; offset: $32 (50)        ; reserved by Apple
  615. futureUse2                 ds.l    1                ; offset: $34 (52)        ; reserved by Apple
  616. futureUse3                 ds.l    1                ; offset: $38 (56)        ; reserved by Apple
  617. futureUse4                 ds.l    1                ; offset: $3C (60)        ; reserved by Apple
  618. sampleArea                 ds.b    1                ; offset: $40 (64) <-- really an array of length one ; space for when samples follow directly
  619.                          ORG 66
  620. sizeof                     EQU *                    ; size:   $42 (66)
  621.                         ENDR
  622. ; typedef struct ExtSoundHeader *        ExtSoundHeaderPtr
  623.  
  624. SoundHeaderUnion        RECORD 0
  625. stdHeader                 ds        SoundHeader        ; offset: $0 (0)
  626.                          ORG 0
  627. cmpHeader                 ds        CmpSoundHeader ; offset: $0 (0)
  628.                          ORG 0
  629. extHeader                 ds        ExtSoundHeader ; offset: $0 (0)
  630. sizeof                     EQU *                    ; size:   $42 (66)
  631.                         ENDR
  632. ConversionBlock            RECORD 0
  633. destination                 ds.w    1                ; offset: $0 (0)
  634. unused                     ds.w    1                ; offset: $2 (2)
  635. inputPtr                 ds.l    1                ; offset: $4 (4)
  636. outputPtr                 ds.l    1                ; offset: $8 (8)
  637. sizeof                     EQU *                    ; size:   $C (12)
  638.                         ENDR
  639. ; typedef struct ConversionBlock *        ConversionBlockPtr
  640.  
  641. ;  ScheduledSoundHeader flags
  642.  
  643. kScheduledSoundDoScheduled        EQU        $01
  644. kScheduledSoundDoCallBack        EQU        $02
  645. ScheduledSoundHeader    RECORD 0
  646. u                         ds        SoundHeaderUnion ; offset: $0 (0)
  647. flags                     ds.l    1                ; offset: $42 (66)
  648. reserved                 ds.w    1                ; offset: $46 (70)
  649. callBackParam1             ds.w    1                ; offset: $48 (72)
  650. callBackParam2             ds.l    1                ; offset: $4A (74)
  651. startTime                 ds        TimeRecord        ; offset: $4E (78)
  652. sizeof                     EQU *                    ; size:   $5E (94)
  653.                         ENDR
  654. ; typedef struct ScheduledSoundHeader *    ScheduledSoundHeaderPtr
  655.  
  656. SMStatus                RECORD 0
  657. smMaxCPULoad             ds.w    1                ; offset: $0 (0)
  658. smNumChannels             ds.w    1                ; offset: $2 (2)
  659. smCurCPULoad             ds.w    1                ; offset: $4 (4)
  660. sizeof                     EQU *                    ; size:   $6 (6)
  661.                         ENDR
  662. ; typedef struct SMStatus *                SMStatusPtr
  663.  
  664. SCStatus                RECORD 0
  665. scStartTime                 ds.l    1                ; offset: $0 (0)
  666. scEndTime                 ds.l    1                ; offset: $4 (4)
  667. scCurrentTime             ds.l    1                ; offset: $8 (8)
  668. scChannelBusy             ds.b    1                ; offset: $C (12)
  669. scChannelDisposed         ds.b    1                ; offset: $D (13)
  670. scChannelPaused             ds.b    1                ; offset: $E (14)
  671. scUnused                 ds.b    1                ; offset: $F (15)
  672. scChannelAttributes         ds.l    1                ; offset: $10 (16)
  673. scCPULoad                 ds.l    1                ; offset: $14 (20)
  674. sizeof                     EQU *                    ; size:   $18 (24)
  675.                         ENDR
  676. ; typedef struct SCStatus *                SCStatusPtr
  677.  
  678. AudioSelection            RECORD 0
  679. unitType                 ds.l    1                ; offset: $0 (0)
  680. selStart                 ds.l    1                ; offset: $4 (4)
  681. selEnd                     ds.l    1                ; offset: $8 (8)
  682. sizeof                     EQU *                    ; size:   $C (12)
  683.                         ENDR
  684. ; typedef struct AudioSelection *        AudioSelectionPtr
  685.  
  686. SndDoubleBuffer            RECORD 0
  687. dbNumFrames                 ds.l    1                ; offset: $0 (0)
  688. dbFlags                     ds.l    1                ; offset: $4 (4)
  689. dbUserInfo                 ds.l    2                ; offset: $8 (8)
  690. dbSoundData                 ds.b    1                ; offset: $10 (16) <-- really an array of length one
  691.                          ORG 18
  692. sizeof                     EQU *                    ; size:   $12 (18)
  693.                         ENDR
  694. ; typedef struct SndDoubleBuffer *        SndDoubleBufferPtr
  695.  
  696. SndDoubleBufferHeader    RECORD 0
  697. dbhNumChannels             ds.w    1                ; offset: $0 (0)
  698. dbhSampleSize             ds.w    1                ; offset: $2 (2)
  699. dbhCompressionID         ds.w    1                ; offset: $4 (4)
  700. dbhPacketSize             ds.w    1                ; offset: $6 (6)
  701. dbhSampleRate             ds.l    1                ; offset: $8 (8)
  702. dbhBufferPtr             ds.l    2                ; offset: $C (12)
  703. dbhDoubleBack             ds.l    1                ; offset: $14 (20)
  704. sizeof                     EQU *                    ; size:   $18 (24)
  705.                         ENDR
  706. ; typedef struct SndDoubleBufferHeader * SndDoubleBufferHeaderPtr
  707.  
  708. SndDoubleBufferHeader2    RECORD 0
  709. dbhNumChannels             ds.w    1                ; offset: $0 (0)
  710. dbhSampleSize             ds.w    1                ; offset: $2 (2)
  711. dbhCompressionID         ds.w    1                ; offset: $4 (4)
  712. dbhPacketSize             ds.w    1                ; offset: $6 (6)
  713. dbhSampleRate             ds.l    1                ; offset: $8 (8)
  714. dbhBufferPtr             ds.l    2                ; offset: $C (12)
  715. dbhDoubleBack             ds.l    1                ; offset: $14 (20)
  716. dbhFormat                 ds.l    1                ; offset: $18 (24)
  717. sizeof                     EQU *                    ; size:   $1C (28)
  718.                         ENDR
  719. ; typedef struct SndDoubleBufferHeader2 * SndDoubleBufferHeader2Ptr
  720.  
  721. SoundInfoList            RECORD 0
  722. count                     ds.w    1                ; offset: $0 (0)
  723. infoHandle                 ds.l    1                ; offset: $2 (2)
  724. sizeof                     EQU *                    ; size:   $6 (6)
  725.                         ENDR
  726. ; typedef struct SoundInfoList *        SoundInfoListPtr
  727.  
  728. SoundComponentData        RECORD 0
  729. flags                     ds.l    1                ; offset: $0 (0)
  730. format                     ds.l    1                ; offset: $4 (4)
  731. numChannels                 ds.w    1                ; offset: $8 (8)
  732. sampleSize                 ds.w    1                ; offset: $A (10)
  733. sampleRate                 ds.l    1                ; offset: $C (12)
  734. sampleCount                 ds.l    1                ; offset: $10 (16)
  735. buffer                     ds.l    1                ; offset: $14 (20)
  736. reserved                 ds.l    1                ; offset: $18 (24)
  737. sizeof                     EQU *                    ; size:   $1C (28)
  738.                         ENDR
  739. ; typedef struct SoundComponentData *    SoundComponentDataPtr
  740.  
  741.  
  742.  
  743. ; typedef SoundParamBlock *                SoundParamBlockPtr
  744.  
  745. SoundParamBlock            RECORD 0
  746. recordSize                 ds.l    1                ; offset: $0 (0)        ; size of this record in bytes
  747. desc                     ds        SoundComponentData ; offset: $4 (4)        ; description of sound buffer
  748. rateMultiplier             ds.l    1                ; offset: $20 (32)        ; rate multiplier to apply to sound
  749. leftVolume                 ds.w    1                ; offset: $24 (36)        ; volumes to apply to sound
  750. rightVolume                 ds.w    1                ; offset: $26 (38)
  751. quality                     ds.l    1                ; offset: $28 (40)        ; quality to apply to sound
  752. filter                     ds.l    1                ; offset: $2C (44)        ; filter to apply to sound
  753. moreRtn                     ds.l    1                ; offset: $30 (48)        ; routine to call to get more data
  754. completionRtn             ds.l    1                ; offset: $34 (52)        ; routine to call when buffer is complete
  755. refCon                     ds.l    1                ; offset: $38 (56)        ; user refcon
  756. result                     ds.w    1                ; offset: $3C (60)        ; result
  757. sizeof                     EQU *                    ; size:   $3E (62)
  758.                         ENDR
  759. CompressionInfo            RECORD 0
  760. recordSize                 ds.l    1                ; offset: $0 (0)
  761. format                     ds.l    1                ; offset: $4 (4)
  762. compressionID             ds.w    1                ; offset: $8 (8)
  763. samplesPerPacket         ds.w    1                ; offset: $A (10)
  764. bytesPerPacket             ds.w    1                ; offset: $C (12)
  765. bytesPerFrame             ds.w    1                ; offset: $E (14)
  766. bytesPerSample             ds.w    1                ; offset: $10 (16)
  767. futureUse1                 ds.w    1                ; offset: $12 (18)
  768. sizeof                     EQU *                    ; size:   $14 (20)
  769.                         ENDR
  770. ; typedef struct CompressionInfo *        CompressionInfoPtr
  771.  
  772. ; typedef CompressionInfoPtr *            CompressionInfoHandle
  773.  
  774. ; variables for floating point conversion
  775. SoundSlopeAndInterceptRecord RECORD 0
  776. slope                     ds        Float64            ; offset: $0 (0)
  777. intercept                 ds        Float64            ; offset: $8 (8)
  778. minClip                     ds        Float64            ; offset: $10 (16)
  779. maxClip                     ds        Float64            ; offset: $18 (24)
  780. sizeof                     EQU *                    ; size:   $20 (32)
  781.                         ENDR
  782. ; typedef struct SoundSlopeAndInterceptRecord * SoundSlopeAndInterceptPtr
  783.  
  784. ; private thing to use as a reference to a Sound Converter
  785.  
  786.  
  787. ; private thing to use as a reference to a Sound Source
  788.  
  789.  
  790. ; typedef SoundSource *                    SoundSourcePtr
  791.  
  792. SoundComponentLink        RECORD 0
  793. description                 ds        ComponentDescription ; offset: $0 (0)    ; Describes the sound component
  794. mixerID                     ds.l    1                ; offset: $14 (20)        ; Reserved by Apple
  795. linkID                     ds.l    1                ; offset: $18 (24)        ; Reserved by Apple
  796. sizeof                     EQU *                    ; size:   $1C (28)
  797.                         ENDR
  798. ; typedef struct SoundComponentLink *    SoundComponentLinkPtr
  799.  
  800. AudioInfo                RECORD 0
  801. capabilitiesFlags         ds.l    1                ; offset: $0 (0)        ; Describes device capabilities
  802. reserved                 ds.l    1                ; offset: $4 (4)        ; Reserved by Apple
  803. numVolumeSteps             ds.w    1                ; offset: $8 (8)        ; Number of significant increments between min and max volume
  804. sizeof                     EQU *                    ; size:   $A (10)
  805.                         ENDR
  806. ; typedef struct AudioInfo *            AudioInfoPtr
  807.  
  808. AudioFormatAtom            RECORD 0
  809. size                     ds.l    1                ; offset: $0 (0)        ;  = sizeof(AudioFormatAtom)
  810. atomType                 ds.l    1                ; offset: $4 (4)        ;  = kAudioFormatAtomType
  811. format                     ds.l    1                ; offset: $8 (8)
  812. sizeof                     EQU *                    ; size:   $C (12)
  813.                         ENDR
  814. ; typedef struct AudioFormatAtom *        AudioFormatAtomPtr
  815.  
  816. AudioEndianAtom            RECORD 0
  817. size                     ds.l    1                ; offset: $0 (0)        ;  = sizeof(AudioEndianAtom)
  818. atomType                 ds.l    1                ; offset: $4 (4)        ;  = kAudioEndianAtomType
  819. littleEndian             ds.w    1                ; offset: $8 (8)
  820. sizeof                     EQU *                    ; size:   $A (10)
  821.                         ENDR
  822. ; typedef struct AudioEndianAtom *        AudioEndianAtomPtr
  823.  
  824. AudioTerminatorAtom        RECORD 0
  825. size                     ds.l    1                ; offset: $0 (0)        ;  = sizeof(AudioTerminatorAtom)
  826. atomType                 ds.l    1                ; offset: $4 (4)        ;  = kAudioTerminatorAtomType
  827. sizeof                     EQU *                    ; size:   $8 (8)
  828.                         ENDR
  829. ; typedef struct AudioTerminatorAtom *    AudioTerminatorAtomPtr
  830.  
  831. ;  Sound Input Structures
  832.  
  833.  
  834. ; typedef SPB *                            SPBPtr
  835.  
  836. ; user procedures called by sound input routines
  837. ; Sound Input Parameter Block
  838. SPB                        RECORD 0
  839. inRefNum                 ds.l    1                ; offset: $0 (0)        ; reference number of sound input device
  840. count                     ds.l    1                ; offset: $4 (4)        ; number of bytes to record
  841. milliseconds             ds.l    1                ; offset: $8 (8)        ; number of milliseconds to record
  842. bufferLength             ds.l    1                ; offset: $C (12)        ; length of buffer in bytes
  843. bufferPtr                 ds.l    1                ; offset: $10 (16)        ; buffer to store sound data in
  844. completionRoutine         ds.l    1                ; offset: $14 (20)        ; completion routine
  845. interruptRoutine         ds.l    1                ; offset: $18 (24)        ; interrupt routine
  846. userLong                 ds.l    1                ; offset: $1C (28)        ; user-defined field
  847. error                     ds.w    1                ; offset: $20 (32)        ; error
  848. unused1                     ds.l    1                ; offset: $22 (34)        ; reserved - must be zero
  849. sizeof                     EQU *                    ; size:   $26 (38)
  850.                         ENDR
  851.  
  852. ;  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  853. ;   prototypes
  854. ;  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  855.  
  856.  
  857.  
  858.  
  859. ;   These two routines for Get/SetSoundVol should no longer be used.
  860. ;   They were for old Apple Sound Chip machines, and do not support the DSP or PowerMacs.
  861. ;   Use Get/SetDefaultOutputVolume instead, if you must change the user's machine.
  862.  
  863.  
  864.  
  865.     IF OLDROUTINENAMES ** TARGET_CPU_68K THEN
  866. ;
  867. ; pascal void SetSoundVol(short level)
  868. ;
  869.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  870.         IMPORT_CFM_FUNCTION SetSoundVol
  871.     ENDIF
  872.  
  873.  
  874. ;
  875. ; pascal void GetSoundVol(short *level)
  876. ;
  877.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  878.         ; parameters:
  879.         ;    level           => A0
  880.         Macro
  881.         _GetSoundVol
  882.             clr.b               (A0)+
  883.             move.b              $0260,(A0)
  884.         EndM
  885.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  886.         IMPORT_CFM_FUNCTION GetSoundVol
  887.     ENDIF
  888.  
  889.     ENDIF
  890. ;  Sound Manager routines 
  891. ;
  892. ; pascal void SysBeep(short duration)
  893. ;
  894.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  895.         _SysBeep:    OPWORD    $A9C8
  896.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  897.         IMPORT_CFM_FUNCTION SysBeep
  898.     ENDIF
  899.  
  900. ;
  901. ; pascal OSErr SndDoCommand(SndChannelPtr chan, const SndCommand *cmd, Boolean noWait)
  902. ;
  903.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  904.         _SndDoCommand:    OPWORD    $A803
  905.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  906.         IMPORT_CFM_FUNCTION SndDoCommand
  907.     ENDIF
  908.  
  909. ;
  910. ; pascal OSErr SndDoImmediate(SndChannelPtr chan, const SndCommand *cmd)
  911. ;
  912.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  913.         _SndDoImmediate:    OPWORD    $A804
  914.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  915.         IMPORT_CFM_FUNCTION SndDoImmediate
  916.     ENDIF
  917.  
  918. ;
  919. ; pascal OSErr SndNewChannel(SndChannelPtr *chan, short synth, long init, SndCallBackUPP userRoutine)
  920. ;
  921.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  922.         _SndNewChannel:    OPWORD    $A807
  923.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  924.         IMPORT_CFM_FUNCTION SndNewChannel
  925.     ENDIF
  926.  
  927. ;
  928. ; pascal OSErr SndDisposeChannel(SndChannelPtr chan, Boolean quietNow)
  929. ;
  930.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  931.         _SndDisposeChannel:    OPWORD    $A801
  932.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  933.         IMPORT_CFM_FUNCTION SndDisposeChannel
  934.     ENDIF
  935.  
  936. ;
  937. ; pascal OSErr SndPlay(SndChannelPtr chan, SndListHandle sndHandle, Boolean async)
  938. ;
  939.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  940.         _SndPlay:    OPWORD    $A805
  941.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  942.         IMPORT_CFM_FUNCTION SndPlay
  943.     ENDIF
  944.  
  945.     IF OLDROUTINENAMES THEN
  946. ;
  947. ; pascal OSErr SndAddModifier(SndChannelPtr chan, Ptr modifier, short id, long init)
  948. ;
  949.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  950.         _SndAddModifier:    OPWORD    $A802
  951.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  952.         IMPORT_CFM_FUNCTION SndAddModifier
  953.     ENDIF
  954.  
  955.     ENDIF    ; OLDROUTINENAMES
  956. ;
  957. ; pascal OSErr SndControl(short id, SndCommand *cmd)
  958. ;
  959.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  960.         _SndControl:    OPWORD    $A806
  961.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  962.         IMPORT_CFM_FUNCTION SndControl
  963.     ENDIF
  964.  
  965. ;  Sound Manager 2.0 and later, uses _SoundDispatch 
  966. ;
  967. ; pascal NumVersion SndSoundManagerVersion(void )
  968. ;
  969.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  970.         Macro
  971.         _SndSoundManagerVersion
  972.             move.l              #$000C0008,D0
  973.             dc.w                $A800
  974.         EndM
  975.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  976.         IMPORT_CFM_FUNCTION SndSoundManagerVersion
  977.     ENDIF
  978.  
  979. ;
  980. ; pascal OSErr SndStartFilePlay(SndChannelPtr chan, short fRefNum, short resNum, long bufferSize, void *theBuffer, AudioSelectionPtr theSelection, FilePlayCompletionUPP theCompletion, Boolean async)
  981. ;
  982.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  983.         Macro
  984.         _SndStartFilePlay
  985.             move.l              #$0D000008,D0
  986.             dc.w                $A800
  987.         EndM
  988.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  989.         IMPORT_CFM_FUNCTION SndStartFilePlay
  990.     ENDIF
  991.  
  992. ;
  993. ; pascal OSErr SndPauseFilePlay(SndChannelPtr chan)
  994. ;
  995.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  996.         Macro
  997.         _SndPauseFilePlay
  998.             move.l              #$02040008,D0
  999.             dc.w                $A800
  1000.         EndM
  1001.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1002.         IMPORT_CFM_FUNCTION SndPauseFilePlay
  1003.     ENDIF
  1004.  
  1005. ;
  1006. ; pascal OSErr SndStopFilePlay(SndChannelPtr chan, Boolean quietNow)
  1007. ;
  1008.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1009.         Macro
  1010.         _SndStopFilePlay
  1011.             move.l              #$03080008,D0
  1012.             dc.w                $A800
  1013.         EndM
  1014.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1015.         IMPORT_CFM_FUNCTION SndStopFilePlay
  1016.     ENDIF
  1017.  
  1018. ;
  1019. ; pascal OSErr SndChannelStatus(SndChannelPtr chan, short theLength, SCStatusPtr theStatus)
  1020. ;
  1021.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1022.         Macro
  1023.         _SndChannelStatus
  1024.             move.l              #$05100008,D0
  1025.             dc.w                $A800
  1026.         EndM
  1027.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1028.         IMPORT_CFM_FUNCTION SndChannelStatus
  1029.     ENDIF
  1030.  
  1031. ;
  1032. ; pascal OSErr SndManagerStatus(short theLength, SMStatusPtr theStatus)
  1033. ;
  1034.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1035.         Macro
  1036.         _SndManagerStatus
  1037.             move.l              #$03140008,D0
  1038.             dc.w                $A800
  1039.         EndM
  1040.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1041.         IMPORT_CFM_FUNCTION SndManagerStatus
  1042.     ENDIF
  1043.  
  1044. ;
  1045. ; pascal void SndGetSysBeepState(short *sysBeepState)
  1046. ;
  1047.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1048.         Macro
  1049.         _SndGetSysBeepState
  1050.             move.l              #$02180008,D0
  1051.             dc.w                $A800
  1052.         EndM
  1053.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1054.         IMPORT_CFM_FUNCTION SndGetSysBeepState
  1055.     ENDIF
  1056.  
  1057. ;
  1058. ; pascal OSErr SndSetSysBeepState(short sysBeepState)
  1059. ;
  1060.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1061.         Macro
  1062.         _SndSetSysBeepState
  1063.             move.l              #$011C0008,D0
  1064.             dc.w                $A800
  1065.         EndM
  1066.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1067.         IMPORT_CFM_FUNCTION SndSetSysBeepState
  1068.     ENDIF
  1069.  
  1070. ;
  1071. ; pascal OSErr SndPlayDoubleBuffer(SndChannelPtr chan, SndDoubleBufferHeaderPtr theParams)
  1072. ;
  1073.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1074.         Macro
  1075.         _SndPlayDoubleBuffer
  1076.             move.l              #$04200008,D0
  1077.             dc.w                $A800
  1078.         EndM
  1079.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1080.         IMPORT_CFM_FUNCTION SndPlayDoubleBuffer
  1081.     ENDIF
  1082.  
  1083. ;  MACE compression routines, uses _SoundDispatch 
  1084. ;
  1085. ; pascal NumVersion MACEVersion(void )
  1086. ;
  1087.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1088.         Macro
  1089.         _MACEVersion
  1090.             move.l              #$00000010,D0
  1091.             dc.w                $A800
  1092.         EndM
  1093.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1094.         IMPORT_CFM_FUNCTION MACEVersion
  1095.     ENDIF
  1096.  
  1097. ;
  1098. ; pascal void Comp3to1(const void *inBuffer, void *outBuffer, unsigned long cnt, StateBlockPtr inState, StateBlockPtr outState, unsigned long numChannels, unsigned long whichChannel)
  1099. ;
  1100.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1101.         Macro
  1102.         _Comp3to1
  1103.             move.l              #$00040010,D0
  1104.             dc.w                $A800
  1105.         EndM
  1106.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1107.         IMPORT_CFM_FUNCTION Comp3to1
  1108.     ENDIF
  1109.  
  1110. ;
  1111. ; pascal void Exp1to3(const void *inBuffer, void *outBuffer, unsigned long cnt, StateBlockPtr inState, StateBlockPtr outState, unsigned long numChannels, unsigned long whichChannel)
  1112. ;
  1113.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1114.         Macro
  1115.         _Exp1to3
  1116.             move.l              #$00080010,D0
  1117.             dc.w                $A800
  1118.         EndM
  1119.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1120.         IMPORT_CFM_FUNCTION Exp1to3
  1121.     ENDIF
  1122.  
  1123. ;
  1124. ; pascal void Comp6to1(const void *inBuffer, void *outBuffer, unsigned long cnt, StateBlockPtr inState, StateBlockPtr outState, unsigned long numChannels, unsigned long whichChannel)
  1125. ;
  1126.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1127.         Macro
  1128.         _Comp6to1
  1129.             move.l              #$000C0010,D0
  1130.             dc.w                $A800
  1131.         EndM
  1132.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1133.         IMPORT_CFM_FUNCTION Comp6to1
  1134.     ENDIF
  1135.  
  1136. ;
  1137. ; pascal void Exp1to6(const void *inBuffer, void *outBuffer, unsigned long cnt, StateBlockPtr inState, StateBlockPtr outState, unsigned long numChannels, unsigned long whichChannel)
  1138. ;
  1139.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1140.         Macro
  1141.         _Exp1to6
  1142.             move.l              #$00100010,D0
  1143.             dc.w                $A800
  1144.         EndM
  1145.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1146.         IMPORT_CFM_FUNCTION Exp1to6
  1147.     ENDIF
  1148.  
  1149. ;  Sound Manager 3.0 and later calls, uses _SoundDispatch 
  1150. ;
  1151. ; pascal OSErr GetSysBeepVolume(long *level)
  1152. ;
  1153.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1154.         Macro
  1155.         _GetSysBeepVolume
  1156.             move.l              #$02240018,D0
  1157.             dc.w                $A800
  1158.         EndM
  1159.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1160.         IMPORT_CFM_FUNCTION GetSysBeepVolume
  1161.     ENDIF
  1162.  
  1163. ;
  1164. ; pascal OSErr SetSysBeepVolume(long level)
  1165. ;
  1166.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1167.         Macro
  1168.         _SetSysBeepVolume
  1169.             move.l              #$02280018,D0
  1170.             dc.w                $A800
  1171.         EndM
  1172.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1173.         IMPORT_CFM_FUNCTION SetSysBeepVolume
  1174.     ENDIF
  1175.  
  1176. ;
  1177. ; pascal OSErr GetDefaultOutputVolume(long *level)
  1178. ;
  1179.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1180.         Macro
  1181.         _GetDefaultOutputVolume
  1182.             move.l              #$022C0018,D0
  1183.             dc.w                $A800
  1184.         EndM
  1185.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1186.         IMPORT_CFM_FUNCTION GetDefaultOutputVolume
  1187.     ENDIF
  1188.  
  1189. ;
  1190. ; pascal OSErr SetDefaultOutputVolume(long level)
  1191. ;
  1192.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1193.         Macro
  1194.         _SetDefaultOutputVolume
  1195.             move.l              #$02300018,D0
  1196.             dc.w                $A800
  1197.         EndM
  1198.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1199.         IMPORT_CFM_FUNCTION SetDefaultOutputVolume
  1200.     ENDIF
  1201.  
  1202. ;
  1203. ; pascal OSErr GetSoundHeaderOffset(SndListHandle sndHandle, long *offset)
  1204. ;
  1205.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1206.         Macro
  1207.         _GetSoundHeaderOffset
  1208.             move.l              #$04040018,D0
  1209.             dc.w                $A800
  1210.         EndM
  1211.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1212.         IMPORT_CFM_FUNCTION GetSoundHeaderOffset
  1213.     ENDIF
  1214.  
  1215. ;
  1216. ; pascal UnsignedFixed UnsignedFixedMulDiv(UnsignedFixed value, UnsignedFixed multiplier, UnsignedFixed divisor)
  1217. ;
  1218.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1219.         Macro
  1220.         _UnsignedFixedMulDiv
  1221.             move.l              #$060C0018,D0
  1222.             dc.w                $A800
  1223.         EndM
  1224.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1225.         IMPORT_CFM_FUNCTION UnsignedFixedMulDiv
  1226.     ENDIF
  1227.  
  1228. ;
  1229. ; pascal OSErr GetCompressionInfo(short compressionID, OSType format, short numChannels, short sampleSize, CompressionInfoPtr cp)
  1230. ;
  1231.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1232.         Macro
  1233.         _GetCompressionInfo
  1234.             move.l              #$07100018,D0
  1235.             dc.w                $A800
  1236.         EndM
  1237.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1238.         IMPORT_CFM_FUNCTION GetCompressionInfo
  1239.     ENDIF
  1240.  
  1241. ;
  1242. ; pascal OSErr SetSoundPreference(OSType theType, Str255 name, Handle settings)
  1243. ;
  1244.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1245.         Macro
  1246.         _SetSoundPreference
  1247.             move.l              #$06340018,D0
  1248.             dc.w                $A800
  1249.         EndM
  1250.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1251.         IMPORT_CFM_FUNCTION SetSoundPreference
  1252.     ENDIF
  1253.  
  1254. ;
  1255. ; pascal OSErr GetSoundPreference(OSType theType, Str255 name, Handle settings)
  1256. ;
  1257.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1258.         Macro
  1259.         _GetSoundPreference
  1260.             move.l              #$06380018,D0
  1261.             dc.w                $A800
  1262.         EndM
  1263.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1264.         IMPORT_CFM_FUNCTION GetSoundPreference
  1265.     ENDIF
  1266.  
  1267. ;
  1268. ; pascal OSErr OpenMixerSoundComponent(SoundComponentDataPtr outputDescription, long outputFlags, ComponentInstance *mixerComponent)
  1269. ;
  1270.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1271.         Macro
  1272.         _OpenMixerSoundComponent
  1273.             move.l              #$06140018,D0
  1274.             dc.w                $A800
  1275.         EndM
  1276.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1277.         IMPORT_CFM_FUNCTION OpenMixerSoundComponent
  1278.     ENDIF
  1279.  
  1280. ;
  1281. ; pascal OSErr CloseMixerSoundComponent(ComponentInstance ci)
  1282. ;
  1283.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1284.         Macro
  1285.         _CloseMixerSoundComponent
  1286.             move.l              #$02180018,D0
  1287.             dc.w                $A800
  1288.         EndM
  1289.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1290.         IMPORT_CFM_FUNCTION CloseMixerSoundComponent
  1291.     ENDIF
  1292.  
  1293. ;  Sound Manager 3.1 and later calls, uses _SoundDispatch 
  1294. ;
  1295. ; pascal OSErr SndGetInfo(SndChannelPtr chan, OSType selector, void *infoPtr)
  1296. ;
  1297.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1298.         Macro
  1299.         _SndGetInfo
  1300.             move.l              #$063C0018,D0
  1301.             dc.w                $A800
  1302.         EndM
  1303.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1304.         IMPORT_CFM_FUNCTION SndGetInfo
  1305.     ENDIF
  1306.  
  1307. ;
  1308. ; pascal OSErr SndSetInfo(SndChannelPtr chan, OSType selector, const void *infoPtr)
  1309. ;
  1310.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1311.         Macro
  1312.         _SndSetInfo
  1313.             move.l              #$06400018,D0
  1314.             dc.w                $A800
  1315.         EndM
  1316.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1317.         IMPORT_CFM_FUNCTION SndSetInfo
  1318.     ENDIF
  1319.  
  1320. ;
  1321. ; pascal OSErr GetSoundOutputInfo(Component outputDevice, OSType selector, void *infoPtr)
  1322. ;
  1323.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1324.         Macro
  1325.         _GetSoundOutputInfo
  1326.             move.l              #$06440018,D0
  1327.             dc.w                $A800
  1328.         EndM
  1329.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1330.         IMPORT_CFM_FUNCTION GetSoundOutputInfo
  1331.     ENDIF
  1332.  
  1333. ;
  1334. ; pascal OSErr SetSoundOutputInfo(Component outputDevice, OSType selector, const void *infoPtr)
  1335. ;
  1336.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1337.         Macro
  1338.         _SetSoundOutputInfo
  1339.             move.l              #$06480018,D0
  1340.             dc.w                $A800
  1341.         EndM
  1342.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1343.         IMPORT_CFM_FUNCTION SetSoundOutputInfo
  1344.     ENDIF
  1345.  
  1346. ;  Sound Manager 3.2 and later calls, uses _SoundDispatch 
  1347. ;
  1348. ; pascal OSErr GetCompressionName(OSType compressionType, Str255 compressionName)
  1349. ;
  1350.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1351.         Macro
  1352.         _GetCompressionName
  1353.             move.l              #$044C0018,D0
  1354.             dc.w                $A800
  1355.         EndM
  1356.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1357.         IMPORT_CFM_FUNCTION GetCompressionName
  1358.     ENDIF
  1359.  
  1360. ;
  1361. ; pascal OSErr SoundConverterOpen(const SoundComponentData *inputFormat, const SoundComponentData *outputFormat, SoundConverter *sc)
  1362. ;
  1363.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1364.         Macro
  1365.         _SoundConverterOpen
  1366.             move.l              #$06500018,D0
  1367.             dc.w                $A800
  1368.         EndM
  1369.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1370.         IMPORT_CFM_FUNCTION SoundConverterOpen
  1371.     ENDIF
  1372.  
  1373. ;
  1374. ; pascal OSErr SoundConverterClose(SoundConverter sc)
  1375. ;
  1376.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1377.         Macro
  1378.         _SoundConverterClose
  1379.             move.l              #$02540018,D0
  1380.             dc.w                $A800
  1381.         EndM
  1382.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1383.         IMPORT_CFM_FUNCTION SoundConverterClose
  1384.     ENDIF
  1385.  
  1386. ;
  1387. ; pascal OSErr SoundConverterGetBufferSizes(SoundConverter sc, unsigned long inputBytesTarget, unsigned long *inputFrames, unsigned long *inputBytes, unsigned long *outputBytes)
  1388. ;
  1389.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1390.         Macro
  1391.         _SoundConverterGetBufferSizes
  1392.             move.l              #$0A580018,D0
  1393.             dc.w                $A800
  1394.         EndM
  1395.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1396.         IMPORT_CFM_FUNCTION SoundConverterGetBufferSizes
  1397.     ENDIF
  1398.  
  1399. ;
  1400. ; pascal OSErr SoundConverterBeginConversion(SoundConverter sc)
  1401. ;
  1402.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1403.         Macro
  1404.         _SoundConverterBeginConversion
  1405.             move.l              #$025C0018,D0
  1406.             dc.w                $A800
  1407.         EndM
  1408.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1409.         IMPORT_CFM_FUNCTION SoundConverterBeginConversion
  1410.     ENDIF
  1411.  
  1412. ;
  1413. ; pascal OSErr SoundConverterConvertBuffer(SoundConverter sc, const void *inputPtr, unsigned long inputFrames, void *outputPtr, unsigned long *outputFrames, unsigned long *outputBytes)
  1414. ;
  1415.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1416.         Macro
  1417.         _SoundConverterConvertBuffer
  1418.             move.l              #$0C600018,D0
  1419.             dc.w                $A800
  1420.         EndM
  1421.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1422.         IMPORT_CFM_FUNCTION SoundConverterConvertBuffer
  1423.     ENDIF
  1424.  
  1425. ;
  1426. ; pascal OSErr SoundConverterEndConversion(SoundConverter sc, void *outputPtr, unsigned long *outputFrames, unsigned long *outputBytes)
  1427. ;
  1428.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1429.         Macro
  1430.         _SoundConverterEndConversion
  1431.             move.l              #$08640018,D0
  1432.             dc.w                $A800
  1433.         EndM
  1434.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1435.         IMPORT_CFM_FUNCTION SoundConverterEndConversion
  1436.     ENDIF
  1437.  
  1438. ;  Sound Manager 3.3 and later calls, uses _SoundDispatch 
  1439. ;
  1440. ; pascal OSErr SoundConverterGetInfo(SoundConverter sc, OSType selector, void *infoPtr)
  1441. ;
  1442.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1443.         Macro
  1444.         _SoundConverterGetInfo
  1445.             move.l              #$06680018,D0
  1446.             dc.w                $A800
  1447.         EndM
  1448.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1449.         IMPORT_CFM_FUNCTION SoundConverterGetInfo
  1450.     ENDIF
  1451.  
  1452. ;
  1453. ; pascal OSErr SoundConverterSetInfo(SoundConverter sc, OSType selector, void *infoPtr)
  1454. ;
  1455.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1456.         Macro
  1457.         _SoundConverterSetInfo
  1458.             move.l              #$066C0018,D0
  1459.             dc.w                $A800
  1460.         EndM
  1461.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1462.         IMPORT_CFM_FUNCTION SoundConverterSetInfo
  1463.     ENDIF
  1464.  
  1465.  
  1466. ;  Sound Component Functions
  1467. ;   basic sound component functions
  1468.  
  1469.  
  1470.  
  1471. ;
  1472. ; pascal ComponentResult SoundComponentInitOutputDevice(ComponentInstance ti, long actions)
  1473. ;
  1474.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1475.         Macro
  1476.         _SoundComponentInitOutputDevice
  1477.             move.l              #$00040001,-(sp)
  1478.             moveq               #0,D0
  1479.             dc.w                $A82A
  1480.         EndM
  1481.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1482.         IMPORT_CFM_FUNCTION SoundComponentInitOutputDevice
  1483.     ENDIF
  1484.  
  1485. ;
  1486. ; pascal ComponentResult SoundComponentSetSource(ComponentInstance ti, SoundSource sourceID, ComponentInstance source)
  1487. ;
  1488.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1489.         Macro
  1490.         _SoundComponentSetSource
  1491.             move.l              #$00080002,-(sp)
  1492.             moveq               #0,D0
  1493.             dc.w                $A82A
  1494.         EndM
  1495.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1496.         IMPORT_CFM_FUNCTION SoundComponentSetSource
  1497.     ENDIF
  1498.  
  1499. ;
  1500. ; pascal ComponentResult SoundComponentGetSource(ComponentInstance ti, SoundSource sourceID, ComponentInstance *source)
  1501. ;
  1502.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1503.         Macro
  1504.         _SoundComponentGetSource
  1505.             move.l              #$00080003,-(sp)
  1506.             moveq               #0,D0
  1507.             dc.w                $A82A
  1508.         EndM
  1509.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1510.         IMPORT_CFM_FUNCTION SoundComponentGetSource
  1511.     ENDIF
  1512.  
  1513. ;
  1514. ; pascal ComponentResult SoundComponentGetSourceData(ComponentInstance ti, SoundComponentDataPtr *sourceData)
  1515. ;
  1516.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1517.         Macro
  1518.         _SoundComponentGetSourceData
  1519.             move.l              #$00040004,-(sp)
  1520.             moveq               #0,D0
  1521.             dc.w                $A82A
  1522.         EndM
  1523.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1524.         IMPORT_CFM_FUNCTION SoundComponentGetSourceData
  1525.     ENDIF
  1526.  
  1527. ;
  1528. ; pascal ComponentResult SoundComponentSetOutput(ComponentInstance ti, SoundComponentDataPtr requested, SoundComponentDataPtr *actual)
  1529. ;
  1530.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1531.         Macro
  1532.         _SoundComponentSetOutput
  1533.             move.l              #$00080005,-(sp)
  1534.             moveq               #0,D0
  1535.             dc.w                $A82A
  1536.         EndM
  1537.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1538.         IMPORT_CFM_FUNCTION SoundComponentSetOutput
  1539.     ENDIF
  1540.  
  1541. ;  junction methods for the mixer, must be called at non-interrupt level
  1542. ;
  1543. ; pascal ComponentResult SoundComponentAddSource(ComponentInstance ti, SoundSource *sourceID)
  1544. ;
  1545.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1546.         Macro
  1547.         _SoundComponentAddSource
  1548.             move.l              #$00040101,-(sp)
  1549.             moveq               #0,D0
  1550.             dc.w                $A82A
  1551.         EndM
  1552.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1553.         IMPORT_CFM_FUNCTION SoundComponentAddSource
  1554.     ENDIF
  1555.  
  1556. ;
  1557. ; pascal ComponentResult SoundComponentRemoveSource(ComponentInstance ti, SoundSource sourceID)
  1558. ;
  1559.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1560.         Macro
  1561.         _SoundComponentRemoveSource
  1562.             move.l              #$00040102,-(sp)
  1563.             moveq               #0,D0
  1564.             dc.w                $A82A
  1565.         EndM
  1566.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1567.         IMPORT_CFM_FUNCTION SoundComponentRemoveSource
  1568.     ENDIF
  1569.  
  1570. ;  info methods
  1571. ;
  1572. ; pascal ComponentResult SoundComponentGetInfo(ComponentInstance ti, SoundSource sourceID, OSType selector, void *infoPtr)
  1573. ;
  1574.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1575.         Macro
  1576.         _SoundComponentGetInfo
  1577.             move.l              #$000C0103,-(sp)
  1578.             moveq               #0,D0
  1579.             dc.w                $A82A
  1580.         EndM
  1581.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1582.         IMPORT_CFM_FUNCTION SoundComponentGetInfo
  1583.     ENDIF
  1584.  
  1585. ;
  1586. ; pascal ComponentResult SoundComponentSetInfo(ComponentInstance ti, SoundSource sourceID, OSType selector, void *infoPtr)
  1587. ;
  1588.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1589.         Macro
  1590.         _SoundComponentSetInfo
  1591.             move.l              #$000C0104,-(sp)
  1592.             moveq               #0,D0
  1593.             dc.w                $A82A
  1594.         EndM
  1595.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1596.         IMPORT_CFM_FUNCTION SoundComponentSetInfo
  1597.     ENDIF
  1598.  
  1599. ;  control methods
  1600. ;
  1601. ; pascal ComponentResult SoundComponentStartSource(ComponentInstance ti, short count, SoundSource *sources)
  1602. ;
  1603.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1604.         Macro
  1605.         _SoundComponentStartSource
  1606.             move.l              #$00060105,-(sp)
  1607.             moveq               #0,D0
  1608.             dc.w                $A82A
  1609.         EndM
  1610.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1611.         IMPORT_CFM_FUNCTION SoundComponentStartSource
  1612.     ENDIF
  1613.  
  1614. ;
  1615. ; pascal ComponentResult SoundComponentStopSource(ComponentInstance ti, short count, SoundSource *sources)
  1616. ;
  1617.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1618.         Macro
  1619.         _SoundComponentStopSource
  1620.             move.l              #$00060106,-(sp)
  1621.             moveq               #0,D0
  1622.             dc.w                $A82A
  1623.         EndM
  1624.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1625.         IMPORT_CFM_FUNCTION SoundComponentStopSource
  1626.     ENDIF
  1627.  
  1628. ;
  1629. ; pascal ComponentResult SoundComponentPauseSource(ComponentInstance ti, short count, SoundSource *sources)
  1630. ;
  1631.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1632.         Macro
  1633.         _SoundComponentPauseSource
  1634.             move.l              #$00060107,-(sp)
  1635.             moveq               #0,D0
  1636.             dc.w                $A82A
  1637.         EndM
  1638.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1639.         IMPORT_CFM_FUNCTION SoundComponentPauseSource
  1640.     ENDIF
  1641.  
  1642. ;
  1643. ; pascal ComponentResult SoundComponentPlaySourceBuffer(ComponentInstance ti, SoundSource sourceID, SoundParamBlockPtr pb, long actions)
  1644. ;
  1645.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1646.         Macro
  1647.         _SoundComponentPlaySourceBuffer
  1648.             move.l              #$000C0108,-(sp)
  1649.             moveq               #0,D0
  1650.             dc.w                $A82A
  1651.         EndM
  1652.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1653.         IMPORT_CFM_FUNCTION SoundComponentPlaySourceBuffer
  1654.     ENDIF
  1655.  
  1656. ; Audio Components
  1657. ; Volume is described as a value between 0 and 1, with 0 indicating minimum
  1658. ;  volume and 1 indicating maximum volume; if the device doesn't support
  1659. ;  software control of volume, then a value of unimpErr is returned, indicating
  1660. ;  that these functions are not supported by the device
  1661.  
  1662. ;
  1663. ; pascal ComponentResult AudioGetVolume(ComponentInstance ac, short whichChannel, ShortFixed *volume)
  1664. ;
  1665.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1666.         Macro
  1667.         _AudioGetVolume
  1668.             move.l              #$00060000,-(sp)
  1669.             moveq               #0,D0
  1670.             dc.w                $A82A
  1671.         EndM
  1672.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1673.         IMPORT_CFM_FUNCTION AudioGetVolume
  1674.     ENDIF
  1675.  
  1676. ;
  1677. ; pascal ComponentResult AudioSetVolume(ComponentInstance ac, short whichChannel, ShortFixed volume)
  1678. ;
  1679.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1680.         Macro
  1681.         _AudioSetVolume
  1682.             move.l              #$00040001,-(sp)
  1683.             moveq               #0,D0
  1684.             dc.w                $A82A
  1685.         EndM
  1686.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1687.         IMPORT_CFM_FUNCTION AudioSetVolume
  1688.     ENDIF
  1689.  
  1690. ; If the device doesn't support software control of mute, then a value of unimpErr is
  1691. ;returned, indicating that these functions are not supported by the device.
  1692. ;
  1693. ; pascal ComponentResult AudioGetMute(ComponentInstance ac, short whichChannel, short *mute)
  1694. ;
  1695.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1696.         Macro
  1697.         _AudioGetMute
  1698.             move.l              #$00060002,-(sp)
  1699.             moveq               #0,D0
  1700.             dc.w                $A82A
  1701.         EndM
  1702.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1703.         IMPORT_CFM_FUNCTION AudioGetMute
  1704.     ENDIF
  1705.  
  1706. ;
  1707. ; pascal ComponentResult AudioSetMute(ComponentInstance ac, short whichChannel, short mute)
  1708. ;
  1709.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1710.         Macro
  1711.         _AudioSetMute
  1712.             move.l              #$00040003,-(sp)
  1713.             moveq               #0,D0
  1714.             dc.w                $A82A
  1715.         EndM
  1716.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1717.         IMPORT_CFM_FUNCTION AudioSetMute
  1718.     ENDIF
  1719.  
  1720. ; AudioSetToDefaults causes the associated device to reset its volume and mute values
  1721. ;(and perhaps other characteristics, e.g. attenuation) to "factory default" settings
  1722. ;
  1723. ; pascal ComponentResult AudioSetToDefaults(ComponentInstance ac)
  1724. ;
  1725.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1726.         Macro
  1727.         _AudioSetToDefaults
  1728.             move.l              #$00000004,-(sp)
  1729.             moveq               #0,D0
  1730.             dc.w                $A82A
  1731.         EndM
  1732.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1733.         IMPORT_CFM_FUNCTION AudioSetToDefaults
  1734.     ENDIF
  1735.  
  1736. ; This routine is required; it must be implemented by all audio components
  1737.  
  1738. ;
  1739. ; pascal ComponentResult AudioGetInfo(ComponentInstance ac, AudioInfoPtr info)
  1740. ;
  1741.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1742.         Macro
  1743.         _AudioGetInfo
  1744.             move.l              #$00040005,-(sp)
  1745.             moveq               #0,D0
  1746.             dc.w                $A82A
  1747.         EndM
  1748.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1749.         IMPORT_CFM_FUNCTION AudioGetInfo
  1750.     ENDIF
  1751.  
  1752. ;
  1753. ; pascal ComponentResult AudioGetBass(ComponentInstance ac, short whichChannel, short *bass)
  1754. ;
  1755.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1756.         Macro
  1757.         _AudioGetBass
  1758.             move.l              #$00060006,-(sp)
  1759.             moveq               #0,D0
  1760.             dc.w                $A82A
  1761.         EndM
  1762.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1763.         IMPORT_CFM_FUNCTION AudioGetBass
  1764.     ENDIF
  1765.  
  1766. ;
  1767. ; pascal ComponentResult AudioSetBass(ComponentInstance ac, short whichChannel, short bass)
  1768. ;
  1769.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1770.         Macro
  1771.         _AudioSetBass
  1772.             move.l              #$00040007,-(sp)
  1773.             moveq               #0,D0
  1774.             dc.w                $A82A
  1775.         EndM
  1776.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1777.         IMPORT_CFM_FUNCTION AudioSetBass
  1778.     ENDIF
  1779.  
  1780. ;
  1781. ; pascal ComponentResult AudioGetTreble(ComponentInstance ac, short whichChannel, short *Treble)
  1782. ;
  1783.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1784.         Macro
  1785.         _AudioGetTreble
  1786.             move.l              #$00060008,-(sp)
  1787.             moveq               #0,D0
  1788.             dc.w                $A82A
  1789.         EndM
  1790.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1791.         IMPORT_CFM_FUNCTION AudioGetTreble
  1792.     ENDIF
  1793.  
  1794. ;
  1795. ; pascal ComponentResult AudioSetTreble(ComponentInstance ac, short whichChannel, short Treble)
  1796. ;
  1797.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1798.         Macro
  1799.         _AudioSetTreble
  1800.             move.l              #$00040009,-(sp)
  1801.             moveq               #0,D0
  1802.             dc.w                $A82A
  1803.         EndM
  1804.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1805.         IMPORT_CFM_FUNCTION AudioSetTreble
  1806.     ENDIF
  1807.  
  1808. ;
  1809. ; pascal ComponentResult AudioGetOutputDevice(ComponentInstance ac, Component *outputDevice)
  1810. ;
  1811.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1812.         Macro
  1813.         _AudioGetOutputDevice
  1814.             move.l              #$0004000A,-(sp)
  1815.             moveq               #0,D0
  1816.             dc.w                $A82A
  1817.         EndM
  1818.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1819.         IMPORT_CFM_FUNCTION AudioGetOutputDevice
  1820.     ENDIF
  1821.  
  1822.  
  1823. ; This is routine is private to the AudioVision component.  It enables the watching of the mute key.
  1824. ;
  1825. ; pascal ComponentResult AudioMuteOnEvent(ComponentInstance ac, short muteOnEvent)
  1826. ;
  1827.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1828.         Macro
  1829.         _AudioMuteOnEvent
  1830.             move.l              #$00020081,-(sp)
  1831.             moveq               #0,D0
  1832.             dc.w                $A82A
  1833.         EndM
  1834.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1835.         IMPORT_CFM_FUNCTION AudioMuteOnEvent
  1836.     ENDIF
  1837.  
  1838.  
  1839. kDelegatedSoundComponentSelectors EQU    $0100
  1840. ;  Sound Input Manager routines, uses _SoundDispatch 
  1841. ;
  1842. ; pascal NumVersion SPBVersion(void )
  1843. ;
  1844.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1845.         Macro
  1846.         _SPBVersion
  1847.             move.l              #$00000014,D0
  1848.             dc.w                $A800
  1849.         EndM
  1850.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1851.         IMPORT_CFM_FUNCTION SPBVersion
  1852.     ENDIF
  1853.  
  1854. ;
  1855. ; pascal OSErr SndRecord(ModalFilterUPP filterProc, Point corner, OSType quality, SndListHandle *sndHandle)
  1856. ;
  1857.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1858.         Macro
  1859.         _SndRecord
  1860.             move.l              #$08040014,D0
  1861.             dc.w                $A800
  1862.         EndM
  1863.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1864.         IMPORT_CFM_FUNCTION SndRecord
  1865.     ENDIF
  1866.  
  1867. ;
  1868. ; pascal OSErr SndRecordToFile(ModalFilterUPP filterProc, Point corner, OSType quality, short fRefNum)
  1869. ;
  1870.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1871.         Macro
  1872.         _SndRecordToFile
  1873.             move.l              #$07080014,D0
  1874.             dc.w                $A800
  1875.         EndM
  1876.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1877.         IMPORT_CFM_FUNCTION SndRecordToFile
  1878.     ENDIF
  1879.  
  1880. ;
  1881. ; pascal OSErr SPBSignInDevice(short deviceRefNum, ConstStr255Param deviceName)
  1882. ;
  1883.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1884.         Macro
  1885.         _SPBSignInDevice
  1886.             move.l              #$030C0014,D0
  1887.             dc.w                $A800
  1888.         EndM
  1889.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1890.         IMPORT_CFM_FUNCTION SPBSignInDevice
  1891.     ENDIF
  1892.  
  1893. ;
  1894. ; pascal OSErr SPBSignOutDevice(short deviceRefNum)
  1895. ;
  1896.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1897.         Macro
  1898.         _SPBSignOutDevice
  1899.             move.l              #$01100014,D0
  1900.             dc.w                $A800
  1901.         EndM
  1902.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1903.         IMPORT_CFM_FUNCTION SPBSignOutDevice
  1904.     ENDIF
  1905.  
  1906. ;
  1907. ; pascal OSErr SPBGetIndexedDevice(short count, Str255 deviceName, Handle *deviceIconHandle)
  1908. ;
  1909.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1910.         Macro
  1911.         _SPBGetIndexedDevice
  1912.             move.l              #$05140014,D0
  1913.             dc.w                $A800
  1914.         EndM
  1915.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1916.         IMPORT_CFM_FUNCTION SPBGetIndexedDevice
  1917.     ENDIF
  1918.  
  1919. ;
  1920. ; pascal OSErr SPBOpenDevice(ConstStr255Param deviceName, short permission, long *inRefNum)
  1921. ;
  1922.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1923.         Macro
  1924.         _SPBOpenDevice
  1925.             move.l              #$05180014,D0
  1926.             dc.w                $A800
  1927.         EndM
  1928.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1929.         IMPORT_CFM_FUNCTION SPBOpenDevice
  1930.     ENDIF
  1931.  
  1932. ;
  1933. ; pascal OSErr SPBCloseDevice(long inRefNum)
  1934. ;
  1935.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1936.         Macro
  1937.         _SPBCloseDevice
  1938.             move.l              #$021C0014,D0
  1939.             dc.w                $A800
  1940.         EndM
  1941.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1942.         IMPORT_CFM_FUNCTION SPBCloseDevice
  1943.     ENDIF
  1944.  
  1945. ;
  1946. ; pascal OSErr SPBRecord(SPBPtr inParamPtr, Boolean asynchFlag)
  1947. ;
  1948.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1949.         Macro
  1950.         _SPBRecord
  1951.             move.l              #$03200014,D0
  1952.             dc.w                $A800
  1953.         EndM
  1954.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1955.         IMPORT_CFM_FUNCTION SPBRecord
  1956.     ENDIF
  1957.  
  1958. ;
  1959. ; pascal OSErr SPBRecordToFile(short fRefNum, SPBPtr inParamPtr, Boolean asynchFlag)
  1960. ;
  1961.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1962.         Macro
  1963.         _SPBRecordToFile
  1964.             move.l              #$04240014,D0
  1965.             dc.w                $A800
  1966.         EndM
  1967.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1968.         IMPORT_CFM_FUNCTION SPBRecordToFile
  1969.     ENDIF
  1970.  
  1971. ;
  1972. ; pascal OSErr SPBPauseRecording(long inRefNum)
  1973. ;
  1974.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1975.         Macro
  1976.         _SPBPauseRecording
  1977.             move.l              #$02280014,D0
  1978.             dc.w                $A800
  1979.         EndM
  1980.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1981.         IMPORT_CFM_FUNCTION SPBPauseRecording
  1982.     ENDIF
  1983.  
  1984. ;
  1985. ; pascal OSErr SPBResumeRecording(long inRefNum)
  1986. ;
  1987.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1988.         Macro
  1989.         _SPBResumeRecording
  1990.             move.l              #$022C0014,D0
  1991.             dc.w                $A800
  1992.         EndM
  1993.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1994.         IMPORT_CFM_FUNCTION SPBResumeRecording
  1995.     ENDIF
  1996.  
  1997. ;
  1998. ; pascal OSErr SPBStopRecording(long inRefNum)
  1999. ;
  2000.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2001.         Macro
  2002.         _SPBStopRecording
  2003.             move.l              #$02300014,D0
  2004.             dc.w                $A800
  2005.         EndM
  2006.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2007.         IMPORT_CFM_FUNCTION SPBStopRecording
  2008.     ENDIF
  2009.  
  2010. ;
  2011. ; pascal OSErr SPBGetRecordingStatus(long inRefNum, short *recordingStatus, short *meterLevel, unsigned long *totalSamplesToRecord, unsigned long *numberOfSamplesRecorded, unsigned long *totalMsecsToRecord, unsigned long *numberOfMsecsRecorded)
  2012. ;
  2013.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2014.         Macro
  2015.         _SPBGetRecordingStatus
  2016.             move.l              #$0E340014,D0
  2017.             dc.w                $A800
  2018.         EndM
  2019.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2020.         IMPORT_CFM_FUNCTION SPBGetRecordingStatus
  2021.     ENDIF
  2022.  
  2023. ;
  2024. ; pascal OSErr SPBGetDeviceInfo(long inRefNum, OSType infoType, void *infoData)
  2025. ;
  2026.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2027.         Macro
  2028.         _SPBGetDeviceInfo
  2029.             move.l              #$06380014,D0
  2030.             dc.w                $A800
  2031.         EndM
  2032.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2033.         IMPORT_CFM_FUNCTION SPBGetDeviceInfo
  2034.     ENDIF
  2035.  
  2036. ;
  2037. ; pascal OSErr SPBSetDeviceInfo(long inRefNum, OSType infoType, void *infoData)
  2038. ;
  2039.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2040.         Macro
  2041.         _SPBSetDeviceInfo
  2042.             move.l              #$063C0014,D0
  2043.             dc.w                $A800
  2044.         EndM
  2045.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2046.         IMPORT_CFM_FUNCTION SPBSetDeviceInfo
  2047.     ENDIF
  2048.  
  2049. ;
  2050. ; pascal OSErr SPBMillisecondsToBytes(long inRefNum, long *milliseconds)
  2051. ;
  2052.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2053.         Macro
  2054.         _SPBMillisecondsToBytes
  2055.             move.l              #$04400014,D0
  2056.             dc.w                $A800
  2057.         EndM
  2058.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2059.         IMPORT_CFM_FUNCTION SPBMillisecondsToBytes
  2060.     ENDIF
  2061.  
  2062. ;
  2063. ; pascal OSErr SPBBytesToMilliseconds(long inRefNum, long *byteCount)
  2064. ;
  2065.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2066.         Macro
  2067.         _SPBBytesToMilliseconds
  2068.             move.l              #$04440014,D0
  2069.             dc.w                $A800
  2070.         EndM
  2071.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2072.         IMPORT_CFM_FUNCTION SPBBytesToMilliseconds
  2073.     ENDIF
  2074.  
  2075. ;
  2076. ; pascal OSErr SetupSndHeader(SndListHandle sndHandle, short numChannels, UnsignedFixed sampleRate, short sampleSize, OSType compressionType, short baseNote, unsigned long numBytes, short *headerLen)
  2077. ;
  2078.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2079.         Macro
  2080.         _SetupSndHeader
  2081.             move.l              #$0D480014,D0
  2082.             dc.w                $A800
  2083.         EndM
  2084.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2085.         IMPORT_CFM_FUNCTION SetupSndHeader
  2086.     ENDIF
  2087.  
  2088. ;
  2089. ; pascal OSErr SetupAIFFHeader(short fRefNum, short numChannels, UnsignedFixed sampleRate, short sampleSize, OSType compressionType, unsigned long numBytes, unsigned long numFrames)
  2090. ;
  2091.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2092.         Macro
  2093.         _SetupAIFFHeader
  2094.             move.l              #$0B4C0014,D0
  2095.             dc.w                $A800
  2096.         EndM
  2097.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2098.         IMPORT_CFM_FUNCTION SetupAIFFHeader
  2099.     ENDIF
  2100.  
  2101. ;  Sound Input Manager 1.1 and later calls, uses _SoundDispatch 
  2102. ;
  2103. ; pascal OSErr ParseAIFFHeader(short fRefNum, SoundComponentData *sndInfo, unsigned long *numFrames, unsigned long *dataOffset)
  2104. ;
  2105.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2106.         Macro
  2107.         _ParseAIFFHeader
  2108.             move.l              #$07580014,D0
  2109.             dc.w                $A800
  2110.         EndM
  2111.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2112.         IMPORT_CFM_FUNCTION ParseAIFFHeader
  2113.     ENDIF
  2114.  
  2115. ;
  2116. ; pascal OSErr ParseSndHeader(SndListHandle sndHandle, SoundComponentData *sndInfo, unsigned long *numFrames, unsigned long *dataOffset)
  2117. ;
  2118.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2119.         Macro
  2120.         _ParseSndHeader
  2121.             move.l              #$085C0014,D0
  2122.             dc.w                $A800
  2123.         EndM
  2124.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2125.         IMPORT_CFM_FUNCTION ParseSndHeader
  2126.     ENDIF
  2127.  
  2128.     IF ¬ TARGET_OS_MAC THEN
  2129. ;   Only to be used if you are writing a sound input component; this 
  2130. ;   is the param block for a read request from the SoundMgr to the   
  2131. ;   sound input component.  Not to be confused with the SPB struct   
  2132. ;   above, which is the param block for a read request from an app   
  2133. ;   to the SoundMgr.                                                 
  2134.  
  2135.  
  2136. ; typedef SndInputCmpParam *            SndInputCmpParamPtr
  2137.  
  2138. SndInputCmpParam        RECORD 0
  2139. ioCompletion             ds.l    1                ; offset: $0 (0)        ;  completion routine [pointer]
  2140. ioInterrupt                 ds.l    1                ; offset: $4 (4)        ;  interrupt routine [pointer]
  2141. ioResult                 ds.w    1                ; offset: $8 (8)        ;  I/O result code [word]
  2142. pad                         ds.w    1                ; offset: $A (10)
  2143. ioReqCount                 ds.l    1                ; offset: $C (12)
  2144. ioActCount                 ds.l    1                ; offset: $10 (16)
  2145. ioBuffer                 ds.l    1                ; offset: $14 (20)
  2146. ioMisc                     ds.l    1                ; offset: $18 (24)
  2147. sizeof                     EQU *                    ; size:   $1C (28)
  2148.                         ENDR
  2149. ;
  2150. ; pascal ComponentResult SndInputReadAsync(ComponentInstance self, SndInputCmpParamPtr SICParmPtr)
  2151. ;
  2152.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2153.         Macro
  2154.         _SndInputReadAsync
  2155.             move.l              #$00040001,-(sp)
  2156.             moveq               #0,D0
  2157.             dc.w                $A82A
  2158.         EndM
  2159.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2160.         IMPORT_CFM_FUNCTION SndInputReadAsync
  2161.     ENDIF
  2162.  
  2163. ;
  2164. ; pascal ComponentResult SndInputReadSync(ComponentInstance self, SndInputCmpParamPtr SICParmPtr)
  2165. ;
  2166.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2167.         Macro
  2168.         _SndInputReadSync
  2169.             move.l              #$00040002,-(sp)
  2170.             moveq               #0,D0
  2171.             dc.w                $A82A
  2172.         EndM
  2173.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2174.         IMPORT_CFM_FUNCTION SndInputReadSync
  2175.     ENDIF
  2176.  
  2177. ;
  2178. ; pascal ComponentResult SndInputPauseRecording(ComponentInstance self)
  2179. ;
  2180.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2181.         Macro
  2182.         _SndInputPauseRecording
  2183.             move.l              #$00000003,-(sp)
  2184.             moveq               #0,D0
  2185.             dc.w                $A82A
  2186.         EndM
  2187.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2188.         IMPORT_CFM_FUNCTION SndInputPauseRecording
  2189.     ENDIF
  2190.  
  2191. ;
  2192. ; pascal ComponentResult SndInputResumeRecording(ComponentInstance self)
  2193. ;
  2194.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2195.         Macro
  2196.         _SndInputResumeRecording
  2197.             move.l              #$00000004,-(sp)
  2198.             moveq               #0,D0
  2199.             dc.w                $A82A
  2200.         EndM
  2201.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2202.         IMPORT_CFM_FUNCTION SndInputResumeRecording
  2203.     ENDIF
  2204.  
  2205. ;
  2206. ; pascal ComponentResult SndInputStopRecording(ComponentInstance self)
  2207. ;
  2208.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2209.         Macro
  2210.         _SndInputStopRecording
  2211.             move.l              #$00000005,-(sp)
  2212.             moveq               #0,D0
  2213.             dc.w                $A82A
  2214.         EndM
  2215.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2216.         IMPORT_CFM_FUNCTION SndInputStopRecording
  2217.     ENDIF
  2218.  
  2219. ;
  2220. ; pascal ComponentResult SndInputGetStatus(ComponentInstance self, short *recordingStatus, unsigned long *totalSamplesToRecord, unsigned long *numberOfSamplesRecorded)
  2221. ;
  2222.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2223.         Macro
  2224.         _SndInputGetStatus
  2225.             move.l              #$000C0006,-(sp)
  2226.             moveq               #0,D0
  2227.             dc.w                $A82A
  2228.         EndM
  2229.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2230.         IMPORT_CFM_FUNCTION SndInputGetStatus
  2231.     ENDIF
  2232.  
  2233. ;
  2234. ; pascal ComponentResult SndInputGetDeviceInfo(ComponentInstance self, OSType infoType, void *infoData)
  2235. ;
  2236.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2237.         Macro
  2238.         _SndInputGetDeviceInfo
  2239.             move.l              #$00080007,-(sp)
  2240.             moveq               #0,D0
  2241.             dc.w                $A82A
  2242.         EndM
  2243.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2244.         IMPORT_CFM_FUNCTION SndInputGetDeviceInfo
  2245.     ENDIF
  2246.  
  2247. ;
  2248. ; pascal ComponentResult SndInputSetDeviceInfo(ComponentInstance self, OSType infoType, void *infoData)
  2249. ;
  2250.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2251.         Macro
  2252.         _SndInputSetDeviceInfo
  2253.             move.l              #$00080008,-(sp)
  2254.             moveq               #0,D0
  2255.             dc.w                $A82A
  2256.         EndM
  2257.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2258.         IMPORT_CFM_FUNCTION SndInputSetDeviceInfo
  2259.     ENDIF
  2260.  
  2261. ;
  2262. ; pascal ComponentResult SndInputInitHardware(ComponentInstance self)
  2263. ;
  2264.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2265.         Macro
  2266.         _SndInputInitHardware
  2267.             move.l              #$00000009,-(sp)
  2268.             moveq               #0,D0
  2269.             dc.w                $A82A
  2270.         EndM
  2271.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2272.         IMPORT_CFM_FUNCTION SndInputInitHardware
  2273.     ENDIF
  2274.  
  2275.     ENDIF
  2276.  
  2277.     ENDIF ; __SOUND__ 
  2278.  
  2279.